Vuo
0.5.1
|
A parser to extract code elements from an LLVM module.
Public Member Functions | |
VuoCompilerBitcodeParser (Module *module) | |
Creates a parser to parse module . | |
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. | |
string | getGlobalString (string name) |
Get the value of the global constant of type char* with variable name 'name'. | |
vector< string > | getStringsFromGlobalArray (string name) |
Get the values of the global constants of type char* stored in global array with name 'name'. | |
Function * | getFunction (string name) |
Get the function with the given name. | |
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. | |
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. | |
vector< pair< Argument *, string > > | getAnnotatedArguments (Function *function) |
Gets all the function's arguments that have annotations, and associates each argument with its annotation(s). | |
VuoCompilerBitcodeParser::VuoCompilerBitcodeParser | ( | Module * | module | ) |
Creates a parser to parse module
.
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).
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.
Function * VuoCompilerBitcodeParser::getFunction | ( | string | name | ) |
Get the function with the given name.
string VuoCompilerBitcodeParser::getGlobalString | ( | string | name | ) |
Get the value of the global constant of type char* with variable name 'name'.
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.
vector< string > VuoCompilerBitcodeParser::getStringsFromGlobalArray | ( | string | name | ) |
Get the values of the global constants of type char* stored in global array with name 'name'.
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.