Vuo
0.4
|
A node class or type defined in an LLVM module.
This class would be the compiler detail class for VuoModule
, except that the inheritance doesn't work out.
Public Member Functions | |
vector< string > | getDependencies (void) |
Returns a list of this VuoCompilerModule's dependencies. | |
Module * | getModule (void) |
Returns this VuoCompilerModule's LLVM module, which other LLVM modules can link to. | |
Static Public Member Functions | |
static VuoCompilerModule * | newModule (string moduleKey, Module *module) |
Instantiates a VuoCompilerModule (or child class) corresponding to the type of VuoCompilerModule defined in the LLVM module. | |
static Function * | declareFunctionInModule (Module *module, Function *function) |
Copies the function's header into the LLVM module, if it's not already there. | |
Protected Member Functions | |
VuoCompilerModule (VuoModule *base, Module *module) | |
Creates a VuoCompilerModule associated with the given LLVM module, as a pseudo compiler detail class of the given VuoModule. | |
virtual | ~VuoCompilerModule () |
Destructor. | |
virtual void | parse (void) |
Renames globals in the LLVM module that might conflict with other VuoCompilerModules, and parses those globals. | |
virtual void | parseMetadata (void) |
Parse the metadata of this VuoCompilerModule (name, description, ...) from the LLVM module. | |
virtual set< string > | globalsToRename (void) |
Returns a list of global variables and functions that may be defined in multiple modules, and thus need to be renamed. | |
string | nameForGlobal (string genericGlobalVarOrFuncName) |
Returns the mangled name for a function or global variable. | |
void | renameGlobalVarsAndFuncs (void) |
Renames the global variables and functions within the LLVM module so that they are unique to this VuoCompilerModule. | |
Protected Attributes | |
vector< string > | dependencies |
The moduleDependencies in this module's definition. | |
Module * | module |
The LLVM module that defines this node class or type. | |
VuoModule * | base |
The (pseudo) base for this (pseudo) compiler detail class. | |
VuoCompilerBitcodeParser * | parser |
The parser of the LLVM module. | |
Friends | |
class | TestVuoCompilerModule |
|
protectedvirtual |
Destructor.
|
static |
Copies the function's header into the LLVM module, if it's not already there.
Use this when an LLVM module needs to call a function defined in another LLVM module.
|
static |
Instantiates a VuoCompilerModule (or child class) corresponding to the type of VuoCompilerModule defined in the LLVM module.
If no type of VuoCompilerModule is defined, returns NULL.