summaryrefslogtreecommitdiffstats
path: root/llvm/lib/IR/LegacyPassManager.cpp
diff options
context:
space:
mode:
authorJessica Paquette <jpaquette@apple.com>2018-08-31 22:43:41 +0000
committerJessica Paquette <jpaquette@apple.com>2018-08-31 22:43:41 +0000
commita69696dca625cf9aed22988bd1c0d56a752221f6 (patch)
treee77f96e6a11a943678c5be44098cd091a36a8bca /llvm/lib/IR/LegacyPassManager.cpp
parent44451b3344bfba2b8566b92f7ccc445b68bccbd5 (diff)
downloadbcm5719-llvm-a69696dca625cf9aed22988bd1c0d56a752221f6.tar.gz
bcm5719-llvm-a69696dca625cf9aed22988bd1c0d56a752221f6.zip
Fix typo in size remarks for module passes
ModuleCount = InstrCount was incorrect. It should have been InstrCount = ModuleCount. This was making it emit an extra, incorrect remark for Print Module IR. The test didn't catch this, because it didn't ensure that the only remark output was from the desired pass. So, it was possible to have an extra remark come through and not fail. Updated the test so that we ensure that the last remark that's output comes from the desired pass. This is done by ensuring that whatever is being read after the last remark is YAML output rather than some incorrect garbage. llvm-svn: 341267
Diffstat (limited to 'llvm/lib/IR/LegacyPassManager.cpp')
-rw-r--r--llvm/lib/IR/LegacyPassManager.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/llvm/lib/IR/LegacyPassManager.cpp b/llvm/lib/IR/LegacyPassManager.cpp
index a413f6ed925..b06d596d1f9 100644
--- a/llvm/lib/IR/LegacyPassManager.cpp
+++ b/llvm/lib/IR/LegacyPassManager.cpp
@@ -1644,7 +1644,7 @@ MPPassManager::runOnModule(Module &M) {
int64_t Delta = static_cast<int64_t>(ModuleCount) -
static_cast<int64_t>(InstrCount);
emitInstrCountChangedRemark(MP, M, Delta, InstrCount);
- ModuleCount = InstrCount;
+ InstrCount = ModuleCount;
}
}
}
OpenPOWER on IntegriCloud