aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-11-22 21:06:59 +0000
committerChris Lattner <sabre@nondot.org>2007-11-22 21:06:59 +0000
commit6325a0225057978107a1cf7e746f976dca35b4e5 (patch)
tree615a186cbd07e2ad8a7cdb9a95b5e027a75ef014
parent7a45980efb114e900adfd61e58e1d1ac2aa7ad50 (diff)
downloadexternal_llvm-6325a0225057978107a1cf7e746f976dca35b4e5.zip
external_llvm-6325a0225057978107a1cf7e746f976dca35b4e5.tar.gz
external_llvm-6325a0225057978107a1cf7e746f976dca35b4e5.tar.bz2
resolve the last fixme's in the new tblgen parser.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@44277 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--utils/TableGen/TGParser.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/utils/TableGen/TGParser.cpp b/utils/TableGen/TGParser.cpp
index d6515e8..2f0533a 100644
--- a/utils/TableGen/TGParser.cpp
+++ b/utils/TableGen/TGParser.cpp
@@ -116,7 +116,7 @@ bool TGParser::SetValue(Record *CurRec, LocTy Loc, const std::string &ValName,
if (RV->setValue(V))
return Error(Loc, "Value '" + ValName + "' of type '" +
RV->getType()->getAsString() +
- "' is incompatible with initializer ''"); // FIXME: Add init!
+ "' is incompatible with initializer '" + V->getAsString() +"'");
return false;
}
@@ -586,9 +586,8 @@ Init *TGParser::ParseSimpleValue(Record *CurRec) {
for (unsigned i = 0, e = Vals.size(); i != e; ++i) {
Init *Bit = Vals[i]->convertInitializerTo(new BitRecTy());
if (Bit == 0) {
- // FIXME: Include value in error.
- Error(BraceLoc, "Element #" + utostr(i) + " ("/* << *Vals[i]
- <<*/ ") is not convertable to a bit");
+ Error(BraceLoc, "Element #" + utostr(i) + " (" + Vals[i]->getAsString()+
+ ") is not convertable to a bit");
return 0;
}
Result->setBit(Vals.size()-i-1, Bit);
@@ -737,9 +736,8 @@ Init *TGParser::ParseValue(Record *CurRec) {
return 0;
}
if (!Result->getFieldType(Lex.getCurStrVal())) {
- // FIXME INCLUDE VALUE IN ERROR.
TokError("Cannot access field '" + Lex.getCurStrVal() + "' of value '" +
- /*<< *$1 <<*/ "'");
+ Result->getAsString() + "'");
return 0;
}
Result = new FieldInit(Result, Lex.getCurStrVal());