[llvm-commits] CVS: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs llvmAsmParser.y.cvs
Reid Spencer
reid at x10sys.com
Thu Mar 29 18:37:57 PDT 2007
Changes in directory llvm/lib/AsmParser:
llvmAsmParser.cpp.cvs updated: 1.79 -> 1.80
llvmAsmParser.y.cvs updated: 1.80 -> 1.81
---
Log message:
For PR1289: http://llvm.org/PR1289 : Regenerate
---
Diffs of the changes: (+64 -0)
llvmAsmParser.cpp.cvs | 32 ++++++++++++++++++++++++++++++++
llvmAsmParser.y.cvs | 32 ++++++++++++++++++++++++++++++++
2 files changed, 64 insertions(+)
Index: llvm/lib/AsmParser/llvmAsmParser.cpp.cvs
diff -u llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.79 llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.80
--- llvm/lib/AsmParser/llvmAsmParser.cpp.cvs:1.79 Thu Mar 29 13:50:01 2007
+++ llvm/lib/AsmParser/llvmAsmParser.cpp.cvs Thu Mar 29 20:37:39 2007
@@ -5946,6 +5946,38 @@
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;
Index: llvm/lib/AsmParser/llvmAsmParser.y.cvs
diff -u llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.80 llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.81
--- llvm/lib/AsmParser/llvmAsmParser.y.cvs:1.80 Thu Mar 29 13:50:01 2007
+++ llvm/lib/AsmParser/llvmAsmParser.y.cvs Thu Mar 29 20:37:39 2007
@@ -2950,6 +2950,38 @@
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;
More information about the llvm-commits
mailing list