Vuo
1.0.1
|
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 | |
virtual | ~VuoCompilerModule (void) |
Destructor. | |
VuoCompilerTargetSet | parseTargetSet (json_object *o, string key) |
Parses the target set value for key in the top level of the JSON object. | |
VuoCompilerTargetSet::MacVersion | parseMacVersion (string version) |
Parses a Mac OS version from a string. | |
set< string > | getDependencies (void) |
Returns a list of this VuoCompilerModule's dependencies. | |
VuoCompilerTargetSet | getCompatibleTargets (void) |
Returns the set of targets (operating system versions) with which this module is compatible. | |
Module * | getModule (void) |
Returns this VuoCompilerModule's LLVM module, which other LLVM modules can link to. | |
VuoModule * | getPseudoBase (void) |
Returns the (psuedo) base for this (psuedo) compiler detail class. | |
bool | getPremium (void) |
Returns a boolean indicating whether this module contains premium content. | |
void | setPremium (bool premium) |
Sets the boolean indicating whether this module contains premium content. | |
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 void | parse (void) |
Renames globals in the LLVM module that might conflict with other VuoCompilerModules, and parses those globals. | |
virtual void | parseMetadata (void) |
Parses 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. | |
Static Protected Member Functions | |
static string | parseString (json_object *o, string key, bool *foundValue=NULL) |
Parses the string value for key in the top level of the JSON object. | |
static int | parseInt (json_object *o, string key, bool *foundValue=NULL) |
Parses the integer value for key in the top level of the JSON object. | |
static bool | parseBool (json_object *o, string key, bool *foundValue=NULL) |
Parses the boolean value for key in the top level of the JSON object. | |
static vector< string > | parseArrayOfStrings (json_object *o, string key) |
Parses the array-of-strings value for key in the top level of the JSON object. | |
static string | nameForGlobal (string nameBeforeCompilation, string moduleKey) |
Returns the mangled name for a function or global variable. | |
static bool | hasOriginalOrMangledGlobal (string nameBeforeCompilation, Module *module, string moduleKey) |
Returns true if the module contains a function or global variable with name nameBeforeCompilation or with the corresponding mangled name. | |
Protected Attributes | |
struct json_object * | moduleDetails |
This module's metadata, found in the argument to VuoModuleMetadata in the module definition. | |
set< string > | dependencies |
The dependencies found in this module's metadata. | |
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. | |
bool | isPremium |
A boolean indicating whether this module contains premium content. | |
Friends | |
class | TestVuoCompilerModule |
|
protected |
Creates a VuoCompilerModule associated with the given LLVM module, as a pseudo compiler detail class of the given VuoModule.
|
virtual |
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.
VuoCompilerTargetSet VuoCompilerModule::getCompatibleTargets | ( | void | ) |
Returns the set of targets (operating system versions) with which this module is compatible.
set< string > VuoCompilerModule::getDependencies | ( | void | ) |
Returns a list of this VuoCompilerModule's dependencies.
Module * VuoCompilerModule::getModule | ( | void | ) |
Returns this VuoCompilerModule's LLVM module, which other LLVM modules can link to.
bool VuoCompilerModule::getPremium | ( | void | ) |
Returns a boolean indicating whether this module contains premium content.
VuoModule * VuoCompilerModule::getPseudoBase | ( | void | ) |
Returns the (psuedo) base for this (psuedo) compiler detail class.
|
protectedvirtual |
Returns a list of global variables and functions that may be defined in multiple modules, and thus need to be renamed.
|
staticprotected |
Returns true if the module contains a function or global variable with name nameBeforeCompilation
or with the corresponding mangled name.
|
protected |
Returns the mangled name for a function or global variable.
|
staticprotected |
Returns the mangled name for a function or global variable.
|
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.
|
protectedvirtual |
Renames globals in the LLVM module that might conflict with other VuoCompilerModules, and parses those globals.
|
staticprotected |
Parses the array-of-strings value for key
in the top level of the JSON object.
If no such value is found, returns an empty vector.
|
staticprotected |
Parses the boolean value for key
in the top level of the JSON object.
If no such value is found, returns false.
|
staticprotected |
Parses the integer value for key
in the top level of the JSON object.
If no such value is found, returns 0.
VuoCompilerTargetSet::MacVersion VuoCompilerModule::parseMacVersion | ( | string | version | ) |
Parses a Mac OS version from a string.
If the string doesn't represent a Mac OS version, returns VuoCompilerTargetSet::MacVersion_Any
.
|
protectedvirtual |
Parses the metadata of this VuoCompilerModule (name, description, ...) from the LLVM module.
|
staticprotected |
Parses the string value for key
in the top level of the JSON object.
If no such value is found, returns an empty string.
VuoCompilerTargetSet VuoCompilerModule::parseTargetSet | ( | json_object * | o, |
string | key | ||
) |
Parses the target set value for key in the top level of the JSON object.
If no such value is found, returns an unrestricted target set.
|
protected |
Renames the global variables and functions within the LLVM module so that they are unique to this VuoCompilerModule.
void VuoCompilerModule::setPremium | ( | bool | premium | ) |
Sets the boolean indicating whether this module contains premium content.
This attribute may be used, e.g., for purposes of automatic documentation generation.
|
protected |
The (pseudo) base for this (pseudo) compiler detail class.
|
protected |
The dependencies found in this module's metadata.
|
protected |
A boolean indicating whether this module contains premium content.
|
protected |
The LLVM module that defines this node class or type.
|
protected |
This module's metadata, found in the argument to VuoModuleMetadata
in the module definition.
|
protected |
The parser of the LLVM module.