package mopsa
Install
dune-project
Dependency
Authors
Maintainers
Sources
md5=37966e98ffeebcedc09bd6e9b2b81f69
sha512=40d4d826c25f680766c07eccbabdf5e8a4fa023016e8a164e4e4f6b3781c8484dc4df437055721dfd19b9db8fb7fe3b61236c4833186d346fc7204a68d01eaaa
doc/mopsa.mopsa_c_parser/Mopsa_c_parser/Clang_to_C/index.html
Module Mopsa_c_parser.Clang_to_C
Source
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 ->
unit
add_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.