A cache of LLVM constant values generated for a module.
Reduces the number of constants in generated bitcode.
Definition at line 15 of file VuoCompilerConstantStringCache.hh.
Public Member Functions | |
Constant * | get (Module *module, const string &s) |
Returns a constant containing the value of the given string, generating code for the constant if needed. More... | |
void | clear (void) |
Empties the cache. More... | |
void VuoCompilerConstantStringCache::clear | ( | void | ) |
Empties the cache.
Call this function before switching to a different LLVM module.
Definition at line 32 of file VuoCompilerConstantStringCache.cc.
Constant * VuoCompilerConstantStringCache::get | ( | Module * | module, |
const string & | s | ||
) |
Returns a constant containing the value of the given string, generating code for the constant if needed.
Consecutive calls of this function should all pass the same module until clear() is called.
Definition at line 18 of file VuoCompilerConstantStringCache.cc.