s/NextValueNo/NextMDValueNo while processing metadata.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@93165 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Devang Patel 2010-01-11 18:52:33 +00:00
parent c30837d6c1
commit 23598502ef
2 changed files with 12 additions and 12 deletions

View File

@ -737,7 +737,7 @@ bool BitcodeReader::ParseValueSymbolTable() {
}
bool BitcodeReader::ParseMetadata() {
unsigned NextValueNo = MDValueList.size();
unsigned NextMDValueNo = MDValueList.size();
if (Stream.EnterSubBlock(bitc::METADATA_BLOCK_ID))
return Error("Malformed block record");
@ -801,8 +801,7 @@ bool BitcodeReader::ParseMetadata() {
}
Value *V = NamedMDNode::Create(Context, Name.str(), Elts.data(),
Elts.size(), TheModule);
// FIXME: This shouldn't poke NextValueNo?
MDValueList.AssignValue(V, NextValueNo++);
MDValueList.AssignValue(V, NextMDValueNo++);
break;
}
case bitc::METADATA_FN_NODE:
@ -826,7 +825,7 @@ bool BitcodeReader::ParseMetadata() {
Value *V = MDNode::getWhenValsUnresolved(Context, &Elts[0], Elts.size(),
IsFunctionLocal);
IsFunctionLocal = false;
MDValueList.AssignValue(V, NextValueNo++);
MDValueList.AssignValue(V, NextMDValueNo++);
break;
}
case bitc::METADATA_STRING: {
@ -837,7 +836,7 @@ bool BitcodeReader::ParseMetadata() {
String[i] = Record[i];
Value *V = MDString::get(Context,
StringRef(String.data(), String.size()));
MDValueList.AssignValue(V, NextValueNo++);
MDValueList.AssignValue(V, NextMDValueNo++);
break;
}
case bitc::METADATA_KIND: {

View File

@ -2138,13 +2138,14 @@ void DwarfDebug::endFunction(MachineFunction *MF) {
}
// Clear debug info
CurrentFnDbgScope = NULL;
DbgScopeMap.clear();
DbgScopeBeginMap.clear();
DbgScopeEndMap.clear();
ConcreteScopes.clear();
AbstractScopesList.clear();
if (CurrentFnDbgScope) {
CurrentFnDbgScope = NULL;
DbgScopeMap.clear();
DbgScopeBeginMap.clear();
DbgScopeEndMap.clear();
ConcreteScopes.clear();
AbstractScopesList.clear();
}
Lines.clear();
if (TimePassesIsEnabled)