llvm.org GIT mirror llvm / 6981383
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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@112082 91177308-0d34-0410-b5e6-96231b3b80d8 Dan Gohman 9 years ago
1 changed file(s) with 2 addition(s) and 0 deletion(s). Raw diff Collapse all Expand all
16351635
16361636 InstructionList.clear();
16371637 unsigned ModuleValueListSize = ValueList.size();
1638 unsigned ModuleMDValueListSize = MDValueList.size();
16381639
16391640 // Add all the function arguments to the value table.
16401641 for(Function::arg_iterator I = F->arg_begin(), E = F->arg_end(); I != E; ++I)
23522353
23532354 // Trim the value list down to the size it was before we parsed this function.
23542355 ValueList.shrinkTo(ModuleValueListSize);
2356 MDValueList.shrinkTo(ModuleMDValueListSize);
23552357 std::vector().swap(FunctionBBs);
23562358
23572359 return false;