For PR1289: Regenerate

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@35500 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Reid Spencer 2007-03-30 01:37:39 +00:00
parent cd5bd90a7b
commit 0d60b5a543
2 changed files with 64 additions and 0 deletions

View File

@ -5946,6 +5946,38 @@ static Module* RunParser(Module * M) {
return 0;
}
// Emit an error if there are any unresolved types left.
if (!CurModule.LateResolveTypes.empty()) {
const ValID &DID = CurModule.LateResolveTypes.begin()->first;
if (DID.Type == ValID::LocalName) {
GenerateError("Undefined type remains at eof: '"+DID.getName() + "'");
} else {
GenerateError("Undefined type remains at eof: #" + itostr(DID.Num));
}
if (ParserResult)
delete ParserResult;
return 0;
}
// Emit an error if there are any unresolved values left.
if (!CurModule.LateResolveValues.empty()) {
Value *V = CurModule.LateResolveValues.back();
std::map<Value*, std::pair<ValID, int> >::iterator I =
CurModule.PlaceHolderInfo.find(V);
if (I != CurModule.PlaceHolderInfo.end()) {
ValID &DID = I->second.first;
if (DID.Type == ValID::LocalName) {
GenerateError("Undefined value remains at eof: "+DID.getName() + "'");
} else {
GenerateError("Undefined value remains at eof: #" + itostr(DID.Num));
}
if (ParserResult)
delete ParserResult;
return 0;
}
}
// Check to make sure that parsing produced a result
if (!ParserResult)
return 0;

View File

@ -2950,6 +2950,38 @@ static Module* RunParser(Module * M) {
return 0;
}
// Emit an error if there are any unresolved types left.
if (!CurModule.LateResolveTypes.empty()) {
const ValID &DID = CurModule.LateResolveTypes.begin()->first;
if (DID.Type == ValID::LocalName) {
GenerateError("Undefined type remains at eof: '"+DID.getName() + "'");
} else {
GenerateError("Undefined type remains at eof: #" + itostr(DID.Num));
}
if (ParserResult)
delete ParserResult;
return 0;
}
// Emit an error if there are any unresolved values left.
if (!CurModule.LateResolveValues.empty()) {
Value *V = CurModule.LateResolveValues.back();
std::map<Value*, std::pair<ValID, int> >::iterator I =
CurModule.PlaceHolderInfo.find(V);
if (I != CurModule.PlaceHolderInfo.end()) {
ValID &DID = I->second.first;
if (DID.Type == ValID::LocalName) {
GenerateError("Undefined value remains at eof: "+DID.getName() + "'");
} else {
GenerateError("Undefined value remains at eof: #" + itostr(DID.Num));
}
if (ParserResult)
delete ParserResult;
return 0;
}
}
// Check to make sure that parsing produced a result
if (!ParserResult)
return 0;