diff options
author | Chris Lattner <sabre@nondot.org> | 2003-12-30 02:44:04 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2003-12-30 02:44:04 +0000 |
commit | 6dea527b4ae8bde56814b10cb96aa9cba5493c2e (patch) | |
tree | 0dff44296099dea0e023ebbc6bc9c2f8ea14cfaf /include | |
parent | b1f5cfe0c4ab46c4c2650cc583118241f93fb4e0 (diff) | |
download | external_llvm-6dea527b4ae8bde56814b10cb96aa9cba5493c2e.zip external_llvm-6dea527b4ae8bde56814b10cb96aa9cba5493c2e.tar.gz external_llvm-6dea527b4ae8bde56814b10cb96aa9cba5493c2e.tar.bz2 |
Add a new class useful for providing fully materialized modules to ExecutionEngine's
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10645 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r-- | include/llvm/ModuleProvider.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/llvm/ModuleProvider.h b/include/llvm/ModuleProvider.h index de9616f..07b7ae3 100644 --- a/include/llvm/ModuleProvider.h +++ b/include/llvm/ModuleProvider.h @@ -54,6 +54,18 @@ public: } }; + +/// ExistingModuleProvider - Allow conversion from a fully materialized Module +/// into a ModuleProvider, allowing code that expects a ModuleProvider to work +/// if we just have a Module. Note that the ModuleProvider takes ownership of +/// the Module specified. +struct ExistingModuleProvider : public ModuleProvider { + ExistingModuleProvider(Module *M) { + TheModule = M; + } + void materializeFunction(Function *F) {} +}; + } // End llvm namespace #endif |