From 7f3df4150c9bfa2e5de07220cea19f9c84d4db52 Mon Sep 17 00:00:00 2001 From: Misha Brukman Date: Fri, 17 Oct 2003 18:27:13 +0000 Subject: [PATCH] Return the Module that we just materialized. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@9201 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/VMCore/ModuleProvider.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) 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; }