diff options
author | Misha Brukman <brukman+llvm@gmail.com> | 2003-10-17 18:27:13 +0000 |
---|---|---|
committer | Misha Brukman <brukman+llvm@gmail.com> | 2003-10-17 18:27:13 +0000 |
commit | 7f3df4150c9bfa2e5de07220cea19f9c84d4db52 (patch) | |
tree | 8e40b5a48c13d6dbb9e3697d732f9ada291b493a | |
parent | 55c0f02cbf4f3716c5fdba7e227c5c8b99bc89ff (diff) |
Return the Module that we just materialized.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9201 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | lib/VMCore/ModuleProvider.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/VMCore/ModuleProvider.cpp b/lib/VMCore/ModuleProvider.cpp index 3a9c50528e..7add84b0cb 100644 --- a/lib/VMCore/ModuleProvider.cpp +++ b/lib/VMCore/ModuleProvider.cpp @@ -19,10 +19,13 @@ ModuleProvider::~ModuleProvider() { /// materializeFunction - make sure the given function is fully read. /// -void ModuleProvider::materializeModule() { - if (!TheModule) return; +Module* ModuleProvider::materializeModule() { + // FIXME: throw an exception instead? + if (!TheModule) return 0; for (Module::iterator i = TheModule->begin(), e = TheModule->end(); i != e; ++i) materializeFunction(i); + + return TheModule; } |