[llvm] r332758 - [NFC] Change cast from r332739 to a static cast
Jessica Paquette via llvm-commits
llvm-commits at lists.llvm.org
Fri May 18 13:04:21 PDT 2018
Author: paquette
Date: Fri May 18 13:04:21 2018
New Revision: 332758
URL: http://llvm.org/viewvc/llvm-project?rev=332758&view=rev
Log:
[NFC] Change cast from r332739 to a static cast
The casts in the delta computation for size remarks should have
been static casts. This fixes that.
Thanks to Dávid Bolvanský for pointing that out.
Modified:
llvm/trunk/lib/IR/LegacyPassManager.cpp
Modified: llvm/trunk/lib/IR/LegacyPassManager.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/IR/LegacyPassManager.cpp?rev=332758&r1=332757&r2=332758&view=diff
==============================================================================
--- llvm/trunk/lib/IR/LegacyPassManager.cpp (original)
+++ llvm/trunk/lib/IR/LegacyPassManager.cpp Fri May 18 13:04:21 2018
@@ -178,7 +178,8 @@ void PMDataManager::emitInstrCountChange
// Compute a possibly negative delta between the instruction count before
// running P, and after running P.
- int64_t Delta = (int64_t)CountAfter - (int64_t)CountBefore;
+ int64_t Delta =
+ static_cast<int64_t>(CountAfter) - static_cast<int64_t>(CountBefore);
BasicBlock &BB = *F->begin();
OptimizationRemarkAnalysis R("size-info", "IRSizeChange",
More information about the llvm-commits
mailing list