Skip to content

Commit c604817

Browse files
author
Jessica Paquette
committed
[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. llvm-svn: 332758
1 parent e3f6529 commit c604817

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

llvm/lib/IR/LegacyPassManager.cpp

+2-1
Original file line numberDiff line numberDiff line change
@@ -178,7 +178,8 @@ void PMDataManager::emitInstrCountChangedRemark(Pass *P, Module &M,
178178

179179
// Compute a possibly negative delta between the instruction count before
180180
// running P, and after running P.
181-
int64_t Delta = (int64_t)CountAfter - (int64_t)CountBefore;
181+
int64_t Delta =
182+
static_cast<int64_t>(CountAfter) - static_cast<int64_t>(CountBefore);
182183

183184
BasicBlock &BB = *F->begin();
184185
OptimizationRemarkAnalysis R("size-info", "IRSizeChange",

0 commit comments

Comments
 (0)