package mopsa
Module Mopsa_c_parser.Clang_to_CSource
Clang_to_C - Translates Clang AST to C AST and link C AST
Abstract structure used internally during project parsing & linking.
create_context project_name target creates a new project (i.e., a program made of several translation units accumulated) with the given name and target. Returns a context to manipulate the project.
val add_translation_unit :
context ->
string ->
Clang_AST.decl ->
string list ->
Clang_AST.comment list ->
Clang_AST.macro list ->
bool ->
string list ->
string list ->
unitadd_translation_unit context name decl files coms macros keep_static forced_stub_list converts a Clang definition of a translation unit with the given name (generally, the source C file) into a cAST and accumulates the definition to the projet. Remove static functions unused in the translation unit, unless keep_static is true (useful for sutb files).
link_project context links all the translation units accumulated in the project and returns the consolidated definitions.
Find a function by its name. Not_found is raised when the function is missing.