[NFC] Add sanitizing assertion to ICF tracker

llvm-svn: 339751
This commit is contained in:
Max Kazantsev 2018-08-15 05:50:38 +00:00
parent 68290f838a
commit df58dd8418
1 changed files with 3 additions and 1 deletions

View File

@ -24,7 +24,9 @@ const Instruction *
ImplicitControlFlowTracking::getFirstICFI(const BasicBlock *BB) {
if (!KnownBlocks.count(BB))
fill(BB);
return FirstImplicitControlFlowInsts.lookup(BB);
auto *FirstICF = FirstImplicitControlFlowInsts.lookup(BB);
assert((!FirstICF || FirstICF->getParent() == BB) && "Inconsistent cache!");
return FirstICF;
}
bool ImplicitControlFlowTracking::hasICF(const BasicBlock *BB) {