From c6048174932ebadeee274d4f8745ceb679aa0a38 Mon Sep 17 00:00:00 2001 From: Jessica Paquette Date: Fri, 18 May 2018 20:04:21 +0000 Subject: [PATCH] [NFC] Change cast from r332739 to a static cast MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/llvm/lib/IR/LegacyPassManager.cpp b/llvm/lib/IR/LegacyPassManager.cpp index 74481b0..6f3da02 100644 --- a/llvm/lib/IR/LegacyPassManager.cpp +++ b/llvm/lib/IR/LegacyPassManager.cpp @@ -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(CountAfter) - static_cast(CountBefore); BasicBlock &BB = *F->begin(); OptimizationRemarkAnalysis R("size-info", "IRSizeChange", -- 2.7.4