[llvm-commits] [llvm] r112082 - /llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
Dan Gohman
gohman at apple.com
Wed Aug 25 13:22:53 PDT 2010
Author: djg
Date: Wed Aug 25 15:22:53 2010
New Revision: 112082
URL: http://llvm.org/viewvc/llvm-project?rev=112082&view=rev
Log:
Fix the bitcode reader to clear out function-specific state
from MDValueList between each function, now that the bitcode
writer is reusing the index space for function-local metadata.
Modified:
llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
Modified: llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp?rev=112082&r1=112081&r2=112082&view=diff
==============================================================================
--- llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp (original)
+++ llvm/trunk/lib/Bitcode/Reader/BitcodeReader.cpp Wed Aug 25 15:22:53 2010
@@ -1636,6 +1636,7 @@
InstructionList.clear();
unsigned ModuleValueListSize = ValueList.size();
+ unsigned ModuleMDValueListSize = MDValueList.size();
// Add all the function arguments to the value table.
for(Function::arg_iterator I = F->arg_begin(), E = F->arg_end(); I != E; ++I)
@@ -2353,6 +2354,7 @@
// Trim the value list down to the size it was before we parsed this function.
ValueList.shrinkTo(ModuleValueListSize);
+ MDValueList.shrinkTo(ModuleMDValueListSize);
std::vector<BasicBlock*>().swap(FunctionBBs);
return false;
More information about the llvm-commits
mailing list