Vuo  0.3
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | Friends | List of all members
VuoCompilerModule Class Reference

Description

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 VuoCompilerModulenewModule (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
 
Module * module
 
VuoModulebase
 
VuoCompilerBitcodeParserparser
 

Friends

class TestVuoCompilerModule
 

Constructor & Destructor Documentation

VuoCompilerModule::~VuoCompilerModule ( )
protectedvirtual

Destructor.

Member Function Documentation

Function * VuoCompilerModule::declareFunctionInModule ( Module *  module,
Function *  functionSrc 
)
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.

VuoCompilerModule * VuoCompilerModule::newModule ( string  moduleKey,
Module *  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.


The documentation for this class was generated from the following files: