LLVM API Documentation

llvm::ModuleProvider Class Reference

#include <ModuleProvider.h>

Inheritance diagram for llvm::ModuleProvider:

Inheritance graph
[legend]
Collaboration diagram for llvm::ModuleProvider:

Collaboration graph
[legend]

List of all members.

Public Member Functions

virtual ~ModuleProvider ()
ModulegetModule ()
virtual bool materializeFunction (Function *F, std::string *ErrInfo=0)=0
virtual void dematerializeFunction (Function *)
virtual ModulematerializeModule (std::string *ErrInfo=0)=0
virtual ModulereleaseModule (std::string *ErrInfo=0)

Protected Member Functions

 ModuleProvider ()

Protected Attributes

ModuleTheModule


Detailed Description

Definition at line 28 of file ModuleProvider.h.


Constructor & Destructor Documentation

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.


Member Function Documentation

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().


Member Data Documentation


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



This web site is hosted by the Computer Science Department at the University of Illinois at Urbana-Champaign.