summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/SafeStackColoring.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/SafeStackColoring.cpp')
-rw-r--r--llvm/lib/CodeGen/SafeStackColoring.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/llvm/lib/CodeGen/SafeStackColoring.cpp b/llvm/lib/CodeGen/SafeStackColoring.cpp
index 329458778a9..b1914b5d380 100644
--- a/llvm/lib/CodeGen/SafeStackColoring.cpp
+++ b/llvm/lib/CodeGen/SafeStackColoring.cpp
@@ -172,7 +172,9 @@ void StackColoring::calculateLocalLiveness() {
BitVector LocalLiveIn;
for (auto *PredBB : predecessors(BB)) {
LivenessMap::const_iterator I = BlockLiveness.find(PredBB);
- assert(I != BlockLiveness.end() && "Predecessor not found");
+ // If a predecessor is unreachable, ignore it.
+ if (I == BlockLiveness.end())
+ continue;
LocalLiveIn |= I->second.LiveOut;
}
OpenPOWER on IntegriCloud