[llvm] r290793 - Avoid const_cast; NFC
Sanjoy Das via llvm-commits
llvm-commits at lists.llvm.org
Sat Dec 31 14:12:31 PST 2016
Author: sanjoy
Date: Sat Dec 31 16:12:31 2016
New Revision: 290793
URL: http://llvm.org/viewvc/llvm-project?rev=290793&view=rev
Log:
Avoid const_cast; NFC
Modified:
llvm/trunk/lib/Analysis/ValueTracking.cpp
Modified: llvm/trunk/lib/Analysis/ValueTracking.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Analysis/ValueTracking.cpp?rev=290793&r1=290792&r2=290793&view=diff
==============================================================================
--- llvm/trunk/lib/Analysis/ValueTracking.cpp (original)
+++ llvm/trunk/lib/Analysis/ValueTracking.cpp Sat Dec 31 16:12:31 2016
@@ -3656,9 +3656,10 @@ bool llvm::isGuaranteedToTransferExecuti
return false;
// Calls can throw, or contain an infinite loop, or kill the process.
- if (CallSite CS = CallSite(const_cast<Instruction*>(I))) {
+ if (auto CS = ImmutableCallSite(I)) {
// Calls which don't write to arbitrary memory are safe.
- // FIXME: Ignoring infinite loops without any side-effects is too aggressive,
+ // FIXME: Ignoring infinite loops without any side-effects is too
+ // aggressive,
// but it's consistent with other passes. See http://llvm.org/PR965 .
// FIXME: This isn't aggressive enough; a call which only writes to a
// global is guaranteed to return.
More information about the llvm-commits
mailing list