[llvm-commits] CVS: llvm/lib/Bytecode/Reader/ReaderInternals.h

Misha Brukman brukman at cs.uiuc.edu
Wed Jan 21 16:56:03 PST 2004


Changes in directory llvm/lib/Bytecode/Reader:

ReaderInternals.h updated: 1.76 -> 1.77

---
Log message:

Implement ModuleProvider::materializeModule() by only materializing functions
that are still left in the lazy reader map.


---
Diffs of the changes:  (+10 -0)

Index: llvm/lib/Bytecode/Reader/ReaderInternals.h
diff -u llvm/lib/Bytecode/Reader/ReaderInternals.h:1.76 llvm/lib/Bytecode/Reader/ReaderInternals.h:1.77
--- llvm/lib/Bytecode/Reader/ReaderInternals.h:1.76	Sun Jan 18 15:08:15 2004
+++ llvm/lib/Bytecode/Reader/ReaderInternals.h	Wed Jan 21 16:55:34 2004
@@ -55,6 +55,16 @@
     freeTable(ModuleValues);
   }
 
+  Module* materializeModule() {
+    while (! LazyFunctionLoadMap.empty()) {
+      std::map<Function*, LazyFunctionInfo>::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();





More information about the llvm-commits mailing list