A parser to extract code elements from an LLVM module.
Definition at line 16 of file VuoCompilerBitcodeParser.hh.
Public Member Functions | |
VuoCompilerBitcodeParser (Module *module) | |
Creates a parser to parse module . More... | |
uint64_t | getGlobalUInt (string name) |
Returns the value of the global constant of type unsigned int (or bool) with variable name 'name', or 0 if the global constant is not found. More... | |
string | getGlobalString (string name) |
Get the value of the global constant of type char* with variable name 'name'. More... | |
vector< string > | getStringsFromGlobalArray (string name) |
Get the values of the global constants of type char* stored in global array with name 'name'. More... | |
Function * | getFunction (string name) |
Get the function with the given name. More... | |
string | getArgumentNameInSourceCode (string argumentNameInBitcode) |
Returns the name of an argument as it would have appeared in the source code of the function, by stripping off the suffix (e.g. More... | |
bool | isFirstOfTwoLoweredArguments (Argument *firstArgument) |
Returns true if this argument and the argument after it correspond to a single argument in the source code, and were lowered to two arguments when Clang compiled them to bitcode. More... | |
vector< pair< Argument *, string > > | getAnnotatedArguments (Function *function) |
Gets all the function's arguments that have annotations, and associates each argument with its annotation(s). More... | |
VuoCompilerBitcodeParser::VuoCompilerBitcodeParser | ( | Module * | module | ) |
Creates a parser to parse module
.
Definition at line 16 of file VuoCompilerBitcodeParser.cc.
vector< pair< Argument *, string > > VuoCompilerBitcodeParser::getAnnotatedArguments | ( | Function * | function | ) |
Gets all the function's arguments that have annotations, and associates each argument with its annotation(s).
Definition at line 181 of file VuoCompilerBitcodeParser.cc.
string VuoCompilerBitcodeParser::getArgumentNameInSourceCode | ( | string | argumentNameInBitcode | ) |
Returns the name of an argument as it would have appeared in the source code of the function, by stripping off the suffix (e.g.
".coerce"), if any.
Definition at line 146 of file VuoCompilerBitcodeParser.cc.
Function * VuoCompilerBitcodeParser::getFunction | ( | string | name | ) |
Get the function with the given name.
Definition at line 137 of file VuoCompilerBitcodeParser.cc.
string VuoCompilerBitcodeParser::getGlobalString | ( | string | name | ) |
Get the value of the global constant of type char* with variable name 'name'.
Definition at line 42 of file VuoCompilerBitcodeParser.cc.
uint64_t VuoCompilerBitcodeParser::getGlobalUInt | ( | string | name | ) |
Returns the value of the global constant of type unsigned int (or bool) with variable name 'name', or 0 if the global constant is not found.
Definition at line 25 of file VuoCompilerBitcodeParser.cc.
vector< string > VuoCompilerBitcodeParser::getStringsFromGlobalArray | ( | string | name | ) |
Get the values of the global constants of type char* stored in global array with name 'name'.
Definition at line 55 of file VuoCompilerBitcodeParser.cc.
bool VuoCompilerBitcodeParser::isFirstOfTwoLoweredArguments | ( | Argument * | firstArgument | ) |
Returns true if this argument and the argument after it correspond to a single argument in the source code, and were lowered to two arguments when Clang compiled them to bitcode.
This happens for some struct types.
Definition at line 156 of file VuoCompilerBitcodeParser.cc.