X-Git-Url: http://plrg.eecs.uci.edu/git/?p=oota-llvm.git;a=blobdiff_plain;f=lib%2FTableGen%2FRecord.cpp;h=b8fc94dd0f6ccf49b145bc6af9b2d5632b9a1ff9;hp=b58a00462a3296b6744bd3ccd036107bde2cd8d7;hb=ac9abe5e992024f905475927ec72c9a19bfcda9c;hpb=134e2e75b35a06e360813704bbb3ae655c5388aa diff --git a/lib/TableGen/Record.cpp b/lib/TableGen/Record.cpp index b58a00462a3..b8fc94dd0f6 100644 --- a/lib/TableGen/Record.cpp +++ b/lib/TableGen/Record.cpp @@ -1007,21 +1007,18 @@ static Init *ForeachHelper(Init *LHS, Init *MHS, Init *RHS, RecTy *Type, static Init *EvaluateOperation(OpInit *RHSo, Init *LHS, Init *Arg, RecTy *Type, Record *CurRec, MultiClass *CurMultiClass) { - std::vector NewOperands; - - TypedInit *TArg = dyn_cast(Arg); - // If this is a dag, recurse - if (TArg && TArg->getType()->getAsString() == "dag") { - Init *Result = ForeachHelper(LHS, Arg, RHSo, Type, - CurRec, CurMultiClass); - return Result; + if (TypedInit *TArg = dyn_cast(Arg)) { + if (TArg->getType()->getAsString() == "dag") { + Init *Result = ForeachHelper(LHS, Arg, RHSo, Type, + CurRec, CurMultiClass); + return Result; + } } + std::vector NewOperands; for (int i = 0; i < RHSo->getNumOperands(); ++i) { - OpInit *RHSoo = dyn_cast(RHSo->getOperand(i)); - - if (RHSoo) { + if (OpInit *RHSoo = dyn_cast(RHSo->getOperand(i))) { Init *Result = EvaluateOperation(RHSoo, LHS, Arg, Type, CurRec, CurMultiClass); if (Result) {