From: Sanjoy Das Date: Sat, 10 Oct 2015 06:33:33 +0000 (+0000) Subject: [IndVars] Use `auto`; NFC X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=e3284eab8a80cc5c3e2514cac085e7bd77b74d3f;p=oota-llvm.git [IndVars] Use `auto`; NFC git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249944 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/lib/Transforms/Scalar/IndVarSimplify.cpp b/lib/Transforms/Scalar/IndVarSimplify.cpp index 0062ce5517d..2a4b5c429f8 100644 --- a/lib/Transforms/Scalar/IndVarSimplify.cpp +++ b/lib/Transforms/Scalar/IndVarSimplify.cpp @@ -962,14 +962,12 @@ Instruction *WidenIV::CloneIVUser(NarrowIVDefUse DU) { Value *RHS = (DU.NarrowUse->getOperand(1) == DU.NarrowDef) ? DU.WideDef : getExtend(DU.NarrowUse->getOperand(1), WideType, IsSigned, DU.NarrowUse); - BinaryOperator *NarrowBO = cast(DU.NarrowUse); - BinaryOperator *WideBO = BinaryOperator::Create(NarrowBO->getOpcode(), - LHS, RHS, - NarrowBO->getName()); + auto *NarrowBO = cast(DU.NarrowUse); + auto *WideBO = BinaryOperator::Create(NarrowBO->getOpcode(), LHS, RHS, + NarrowBO->getName()); IRBuilder<> Builder(DU.NarrowUse); Builder.Insert(WideBO); - if (const OverflowingBinaryOperator *OBO = - dyn_cast(NarrowBO)) { + if (const auto *OBO = dyn_cast(NarrowBO)) { if (OBO->hasNoUnsignedWrap()) WideBO->setHasNoUnsignedWrap(); if (OBO->hasNoSignedWrap()) WideBO->setHasNoSignedWrap(); }