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 | de360f88c8655570d2268e02a7769ac36c809b26 (patch) | |
tree | dd93c56e79d2768583e219ada4ff9b95b5980d5b /llvm/lib/VMCore/ModuleProvider.cpp | |
parent | d2bc5ac04556a07fe846a514644a171639593d5c (diff) | |
download | bcm5719-llvm-de360f88c8655570d2268e02a7769ac36c809b26.tar.gz bcm5719-llvm-de360f88c8655570d2268e02a7769ac36c809b26.zip |
Return the Module that we just materialized.
llvm-svn: 9201
Diffstat (limited to 'llvm/lib/VMCore/ModuleProvider.cpp')
-rw-r--r-- | llvm/lib/VMCore/ModuleProvider.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/llvm/lib/VMCore/ModuleProvider.cpp b/llvm/lib/VMCore/ModuleProvider.cpp index 3a9c50528e2..7add84b0cb6 100644 --- a/llvm/lib/VMCore/ModuleProvider.cpp +++ b/llvm/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; } |