[llvm] r285528 - [SCEV] Use auto for consistency with an upcoming change; NFC

Sanjoy Das via llvm-commits llvm-commits at lists.llvm.org
Sun Oct 30 16:52:53 PDT 2016


Author: sanjoy
Date: Sun Oct 30 18:52:53 2016
New Revision: 285528

URL: http://llvm.org/viewvc/llvm-project?rev=285528&view=rev
Log:
[SCEV] Use auto for consistency with an upcoming change; NFC

Modified:
    llvm/trunk/lib/Analysis/ScalarEvolution.cpp

Modified: llvm/trunk/lib/Analysis/ScalarEvolution.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ScalarEvolution.cpp?rev=285528&r1=285527&r2=285528&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ScalarEvolution.cpp (original)
+++ llvm/trunk/lib/Analysis/ScalarEvolution.cpp Sun Oct 30 18:52:53 2016
@@ -471,16 +471,16 @@ static int CompareValueComplexity(const
     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(),




More information about the llvm-commits mailing list