diff --git a/lib/TableGen/Record.cpp b/lib/TableGen/Record.cpp index 9783922b966..9f71e1347f6 100644 --- a/lib/TableGen/Record.cpp +++ b/lib/TableGen/Record.cpp @@ -717,7 +717,7 @@ UnOpInit *UnOpInit::get(UnaryOp opc, Init *lhs, RecTy *Type) { Init *UnOpInit::Fold(Record *CurRec, MultiClass *CurMultiClass) const { switch (getOpcode()) { case CAST: { - if (getType()->getAsString() == "string") { + if (isa(getType())) { if (StringInit *LHSs = dyn_cast(LHS)) return LHSs; @@ -987,7 +987,7 @@ static Init *EvaluateOperation(OpInit *RHSo, Init *LHS, Init *Arg, MultiClass *CurMultiClass) { // If this is a dag, recurse if (auto *TArg = dyn_cast(Arg)) - if (TArg->getType()->getAsString() == "dag") + if (isa(TArg->getType())) return ForeachHelper(LHS, Arg, RHSo, Type, CurRec, CurMultiClass); std::vector NewOperands;