From: Misha Brukman Date: Wed, 21 Jan 2004 22:55:34 +0000 (+0000) Subject: Implement ModuleProvider::materializeModule() by only materializing functions X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=afca90e83234b1baf5bafba0e79b7ead0ffb67e8;p=oota-llvm.git Implement ModuleProvider::materializeModule() by only materializing functions that are still left in the lazy reader map. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@10944 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Bytecode/Reader/ReaderInternals.h b/lib/Bytecode/Reader/ReaderInternals.h index f5ef3d90b61..ff28e25db61 100644 --- a/lib/Bytecode/Reader/ReaderInternals.h +++ b/lib/Bytecode/Reader/ReaderInternals.h @@ -55,6 +55,16 @@ public: freeTable(ModuleValues); } + Module* materializeModule() { + while (! LazyFunctionLoadMap.empty()) { + std::map::iterator i = + LazyFunctionLoadMap.begin(); + materializeFunction((*i).first); + } + + return TheModule; + } + Module* releaseModule() { // Since we're losing control of this Module, we must hand it back complete Module *M = ModuleProvider::releaseModule();