LLVM API Documentation
#include <ModuleProvider.h>


Public Member Functions | |
| virtual | ~ModuleProvider () |
| Module * | getModule () |
| virtual bool | materializeFunction (Function *F, std::string *ErrInfo=0)=0 |
| virtual void | dematerializeFunction (Function *) |
| virtual Module * | materializeModule (std::string *ErrInfo=0)=0 |
| virtual Module * | releaseModule (std::string *ErrInfo=0) |
Protected Member Functions | |
| ModuleProvider () | |
Protected Attributes | |
| Module * | TheModule |
Definition at line 28 of file ModuleProvider.h.
| ModuleProvider::ModuleProvider | ( | ) | [protected] |
ctor - always have a valid Module
Definition at line 20 of file ModuleProvider.cpp.
| ModuleProvider::~ModuleProvider | ( | ) | [virtual] |
dtor - when we leave, we take our Module with us
Definition at line 24 of file ModuleProvider.cpp.
References TheModule.
| Module* llvm::ModuleProvider::getModule | ( | ) | [inline] |
getModule - returns the module this provider is encapsulating.
Definition at line 38 of file ModuleProvider.h.
References TheModule.
Referenced by llvm::JIT::createJIT(), llvm::FunctionPassManager::doFinalization(), llvm::FunctionPassManager::doInitialization(), and llvm::ExecutionEngine::removeModuleProvider().
| virtual bool llvm::ModuleProvider::materializeFunction | ( | Function * | F, | |
| std::string * | ErrInfo = 0 | |||
| ) | [pure virtual] |
materializeFunction - make sure the given function is fully read. If the module is corrupt, this returns true and fills in the optional string with information about the problem. If successful, this returns false.
Implemented in llvm::ExistingModuleProvider, and llvm::BitcodeReader.
Referenced by llvm::JIT::getPointerToFunction(), and llvm::FunctionPassManager::run().
| virtual void llvm::ModuleProvider::dematerializeFunction | ( | Function * | ) | [inline, virtual] |
dematerializeFunction - If the given function is read in, and if the module provider supports it, release the memory for the function, and set it up to be materialized lazily. If the provider doesn't support this capability, this method is a noop.
Reimplemented in llvm::BitcodeReader.
Definition at line 51 of file ModuleProvider.h.
| virtual Module* llvm::ModuleProvider::materializeModule | ( | std::string * | ErrInfo = 0 |
) | [pure virtual] |
materializeModule - make sure the entire Module has been completely read. On error, return null and fill in the error string if specified.
Implemented in llvm::ExistingModuleProvider, and llvm::BitcodeReader.
Referenced by llvm::Interpreter::create(), llvm::GetBitcodeSymbols(), and releaseModule().
| virtual Module* llvm::ModuleProvider::releaseModule | ( | std::string * | ErrInfo = 0 |
) | [inline, virtual] |
releaseModule - no longer delete the Module* when provider is destroyed. On error, return null and fill in the error string if specified.
Reimplemented in llvm::BitcodeReader.
Definition at line 61 of file ModuleProvider.h.
References materializeModule(), and TheModule.
Referenced by llvm::BitcodeReader::releaseModule(), and llvm::ExecutionEngine::removeModuleProvider().
Module* llvm::ModuleProvider::TheModule [protected] |
Definition at line 30 of file ModuleProvider.h.
Referenced by llvm::ExistingModuleProvider::ExistingModuleProvider(), getModule(), llvm::ExistingModuleProvider::materializeModule(), llvm::BitcodeReader::materializeModule(), llvm::BitcodeReader::ParseBitcode(), releaseModule(), and ~ModuleProvider().
This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.