From: Misha Brukman Date: Fri, 17 Oct 2003 18:27:13 +0000 (+0000) Subject: Return the Module that we just materialized. X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=7f3df4150c9bfa2e5de07220cea19f9c84d4db52;p=oota-llvm.git Return the Module that we just materialized. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9201 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/VMCore/ModuleProvider.cpp b/lib/VMCore/ModuleProvider.cpp index 3a9c50528e2..7add84b0cb6 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; }