[llvm] r306255 - [MemDep] Cleanup return after else & use `auto`. NFC.
Davide Italiano via llvm-commits
llvm-commits at lists.llvm.org
Sun Jun 25 15:12:59 PDT 2017
Author: davide
Date: Sun Jun 25 15:12:59 2017
New Revision: 306255
URL: http://llvm.org/viewvc/llvm-project?rev=306255&view=rev
Log:
[MemDep] Cleanup return after else & use `auto`. NFC.
Modified:
llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
Modified: llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp?rev=306255&r1=306254&r2=306255&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp (original)
+++ llvm/trunk/lib/Analysis/MemoryDependenceAnalysis.cpp Sun Jun 25 15:12:59 2017
@@ -310,11 +310,11 @@ unsigned MemoryDependenceResults::getLoa
}
static bool isVolatile(Instruction *Inst) {
- if (LoadInst *LI = dyn_cast<LoadInst>(Inst))
+ if (auto *LI = dyn_cast<LoadInst>(Inst))
return LI->isVolatile();
- else if (StoreInst *SI = dyn_cast<StoreInst>(Inst))
+ if (auto *SI = dyn_cast<StoreInst>(Inst))
return SI->isVolatile();
- else if (AtomicCmpXchgInst *AI = dyn_cast<AtomicCmpXchgInst>(Inst))
+ if (auto *AI = dyn_cast<AtomicCmpXchgInst>(Inst))
return AI->isVolatile();
return false;
}
More information about the llvm-commits
mailing list