diff options
author | Misha Brukman <brukman+llvm@gmail.com> | 2004-01-21 22:55:34 +0000 |
---|---|---|
committer | Misha Brukman <brukman+llvm@gmail.com> | 2004-01-21 22:55:34 +0000 |
commit | ba3c670292e385a9cf58a6d0843ab48d1d0280db (patch) | |
tree | 7e5f3465fba71b6c83799bf65b099099eda5a14b /llvm/lib/Bytecode/Reader | |
parent | 2cbec5de52ed4ac6efdb7e74745b902b8e876960 (diff) | |
download | bcm5719-llvm-ba3c670292e385a9cf58a6d0843ab48d1d0280db.tar.gz bcm5719-llvm-ba3c670292e385a9cf58a6d0843ab48d1d0280db.zip |
Implement ModuleProvider::materializeModule() by only materializing functions
that are still left in the lazy reader map.
llvm-svn: 10944
Diffstat (limited to 'llvm/lib/Bytecode/Reader')
-rw-r--r-- | llvm/lib/Bytecode/Reader/ReaderInternals.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/llvm/lib/Bytecode/Reader/ReaderInternals.h b/llvm/lib/Bytecode/Reader/ReaderInternals.h index f5ef3d90b61..ff28e25db61 100644 --- a/llvm/lib/Bytecode/Reader/ReaderInternals.h +++ b/llvm/lib/Bytecode/Reader/ReaderInternals.h @@ -55,6 +55,16 @@ public: 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(); |