diff options
Diffstat (limited to 'llvm/lib')
-rw-r--r-- | llvm/lib/Transforms/Utils/ImplicitControlFlowTracking.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/Transforms/Utils/ImplicitControlFlowTracking.cpp b/llvm/lib/Transforms/Utils/ImplicitControlFlowTracking.cpp index a5b6c54533a..0e1591f42ad 100644 --- a/llvm/lib/Transforms/Utils/ImplicitControlFlowTracking.cpp +++ b/llvm/lib/Transforms/Utils/ImplicitControlFlowTracking.cpp @@ -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) { |