[PATCH] D25178: [CodeGen] Don't assume that a landing pad exists in setMustKeepGlobalVariables
Martin Storsjö via llvm-commits
llvm-commits at lists.llvm.org
Mon Oct 3 02:02:26 PDT 2016
mstorsjo created this revision.
mstorsjo added a reviewer: qcolombet.
mstorsjo added a subscriber: llvm-commits.
Herald added a subscriber: aemerson.
This fixes crashes (PR30535) when building C++ code (with exceptions enabled) for ARM/Windows with optimizations enabled.
https://reviews.llvm.org/D25178
Files:
lib/CodeGen/GlobalMerge.cpp
Index: lib/CodeGen/GlobalMerge.cpp
===================================================================
--- lib/CodeGen/GlobalMerge.cpp
+++ lib/CodeGen/GlobalMerge.cpp
@@ -511,6 +511,7 @@
if (!II) continue;
const LandingPadInst *LPInst = II->getUnwindDest()->getLandingPadInst();
+ if (!LPInst) continue;
// Look for globals in the clauses of the landing pad instruction
for (unsigned Idx = 0, NumClauses = LPInst->getNumClauses();
Idx != NumClauses; ++Idx)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D25178.73246.patch
Type: text/x-patch
Size: 504 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20161003/12099753/attachment.bin>
More information about the llvm-commits
mailing list