summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp
diff options
context:
space:
mode:
authorReid Kleckner <reid@kleckner.net>2015-01-23 23:51:25 +0000
committerReid Kleckner <reid@kleckner.net>2015-01-23 23:51:25 +0000
commit3d4638b391f1d3c0bbc3b89f7ddf55ac5dd17ece (patch)
treeecbb91717a9ba775dd428a4ec205ecbbcc32ba38 /llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp
parentf69dc349d57e1492e0da85ed84fe017d7f43fdbe (diff)
downloadbcm5719-llvm-3d4638b391f1d3c0bbc3b89f7ddf55ac5dd17ece.tar.gz
bcm5719-llvm-3d4638b391f1d3c0bbc3b89f7ddf55ac5dd17ece.zip
Fix assertion when C++ EH filters are present in functions using SEH
Should fix PR22305. llvm-svn: 226969
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp b/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp
index a1719a51889..ff12d5d3247 100644
--- a/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/Win64Exception.cpp
@@ -221,12 +221,11 @@ void Win64Exception::emitCSpecificHandlerTable() {
// Do a parallel iteration across typeids and clause labels, skipping filter
// clauses.
- assert(LPad->TypeIds.size() == LPad->ClauseLabels.size());
+ size_t NextClauseLabel = 0;
for (size_t I = 0, E = LPad->TypeIds.size(); I < E; ++I) {
// AddLandingPadInfo stores the clauses in reverse, but there is a FIXME
// to change that.
int Selector = LPad->TypeIds[E - I - 1];
- MCSymbol *ClauseLabel = LPad->ClauseLabels[I];
// Ignore C++ filter clauses in SEH.
// FIXME: Implement cleanup clauses.
@@ -243,6 +242,7 @@ void Win64Exception::emitCSpecificHandlerTable() {
else // Otherwise, this is a "catch i8* null", or catch all.
Asm->OutStreamer.EmitIntValue(1, 4);
}
+ MCSymbol *ClauseLabel = LPad->ClauseLabels[NextClauseLabel++];
Asm->OutStreamer.EmitValue(createImageRel32(ClauseLabel), 4);
}
}
OpenPOWER on IntegriCloud