From de360f88c8655570d2268e02a7769ac36c809b26 Mon Sep 17 00:00:00 2001 From: Misha Brukman Date: Fri, 17 Oct 2003 18:27:13 +0000 Subject: Return the Module that we just materialized. llvm-svn: 9201 --- llvm/lib/VMCore/ModuleProvider.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'llvm/lib/VMCore/ModuleProvider.cpp') 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; } -- cgit v1.2.3