package mopsa
Install
Dune Dependency
Authors
Maintainers
Sources
md5=fdee20e988343751de440b4f6b67c0f4
sha512=f5cbf1328785d3f5ce40155dada2d95e5de5cce4f084ea30cfb04d1ab10cc9403a26cfb3fa55d0f9da72244482130fdb89c286a9aed0d640bba46b7c00e09500
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 ->
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.