[NFC] Change cast from r332739 to a static cast
authorJessica Paquette <jpaquette@apple.com>
Fri, 18 May 2018 20:04:21 +0000 (20:04 +0000)
committerJessica Paquette <jpaquette@apple.com>
Fri, 18 May 2018 20:04:21 +0000 (20:04 +0000)
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.

llvm-svn: 332758

llvm/lib/IR/LegacyPassManager.cpp

index 74481b0..6f3da02 100644 (file)
@@ -178,7 +178,8 @@ void PMDataManager::emitInstrCountChangedRemark(Pass *P, Module &M,
 
   // 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",