]> granicus.if.org Git - llvm/commitdiff
[SCEV] Use auto for consistency with an upcoming change; NFC
authorSanjoy Das <sanjoy@playingwithpointers.com>
Sun, 30 Oct 2016 23:52:53 +0000 (23:52 +0000)
committerSanjoy Das <sanjoy@playingwithpointers.com>
Sun, 30 Oct 2016 23:52:53 +0000 (23:52 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@285528 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Analysis/ScalarEvolution.cpp

index f03051ddb4a2b0550d7f02a09bb7c85b821f4b1e..fd8cec54826279663ac29110bed7b26154db1499 100644 (file)
@@ -471,16 +471,16 @@ static int CompareValueComplexity(const LoopInfo *const LI, Value *LV,
     return (int)LID - (int)RID;
 
   // Sort arguments by their position.
-  if (const Argument *LA = dyn_cast<Argument>(LV)) {
-    const Argument *RA = cast<Argument>(RV);
+  if (const auto *LA = dyn_cast<Argument>(LV)) {
+    const auto *RA = cast<Argument>(RV);
     unsigned LArgNo = LA->getArgNo(), RArgNo = RA->getArgNo();
     return (int)LArgNo - (int)RArgNo;
   }
 
   // For instructions, compare their loop depth, and their operand count.  This
   // is pretty loose.
-  if (const Instruction *LInst = dyn_cast<Instruction>(LV)) {
-    const Instruction *RInst = cast<Instruction>(RV);
+  if (const auto *LInst = dyn_cast<Instruction>(LV)) {
+    const auto *RInst = cast<Instruction>(RV);
 
     // Compare loop depths.
     const BasicBlock *LParent = LInst->getParent(),