X-Git-Url: http://plrg.eecs.uci.edu/git/?a=blobdiff_plain;f=lib%2FTableGen%2FRecord.cpp;h=089f380f1f9c685cf3016d31d4c513e34647b133;hb=21092d8a7c9106db6f97c93484f8889d34fea742;hp=58f2f07b0b0ba7729a15cfb63900cb65a5afeadd;hpb=54bff8596fb1921bdb00ac6dd0bd1ac9e2420b58;p=oota-llvm.git diff --git a/lib/TableGen/Record.cpp b/lib/TableGen/Record.cpp index 58f2f07b0b0..089f380f1f9 100644 --- a/lib/TableGen/Record.cpp +++ b/lib/TableGen/Record.cpp @@ -1114,9 +1114,9 @@ Init *TernOpInit::Fold(Record *CurRec, MultiClass *CurMultiClass) const { VarInit *RHSv = dyn_cast(RHS); StringInit *RHSs = dyn_cast(RHS); - if ((LHSd && MHSd && RHSd) - || (LHSv && MHSv && RHSv) - || (LHSs && MHSs && RHSs)) { + if ((LHSd && MHSd && RHSd) || + (LHSv && MHSv && RHSv) || + (LHSs && MHSs && RHSs)) { if (RHSd) { Record *Val = RHSd->getDef(); if (LHSd->getAsString() == RHSd->getAsString()) { @@ -1214,9 +1214,9 @@ std::string TernOpInit::getAsString() const { case SUBST: Result = "!subst"; break; case FOREACH: Result = "!foreach"; break; case IF: Result = "!if"; break; - } - return Result + "(" + LHS->getAsString() + ", " + MHS->getAsString() + ", " - + RHS->getAsString() + ")"; + } + return Result + "(" + LHS->getAsString() + ", " + MHS->getAsString() + ", " + + RHS->getAsString() + ")"; } RecTy *TypedInit::getFieldType(const std::string &FieldName) const { @@ -1663,14 +1663,13 @@ void Record::resolveReferencesTo(const RecordVal *RV) { continue; if (Init *V = Values[i].getValue()) if (Values[i].setValue(V->resolveReferences(*this, RV))) - PrintFatalError(getLoc(), "Invalid value is found when setting '" - + Values[i].getNameInitAsString() - + "' after resolving references" - + (RV ? " against '" + RV->getNameInitAsString() - + "' of (" - + RV->getValue()->getAsUnquotedString() + ")" - : "") - + "\n"); + PrintFatalError(getLoc(), "Invalid value is found when setting '" + + Values[i].getNameInitAsString() + + "' after resolving references" + + (RV ? " against '" + RV->getNameInitAsString() + + "' of (" + RV->getValue()->getAsUnquotedString() + + ")" + : "") + "\n"); } Init *OldName = getNameInit(); Init *NewName = Name->resolveReferences(*this, RV);