summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/WinException.cpp3
-rw-r--r--llvm/test/CodeGen/X86/seh-catchpad.ll2
2 files changed, 3 insertions, 2 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/WinException.cpp b/llvm/lib/CodeGen/AsmPrinter/WinException.cpp
index f672f93a3ee..5661a378c30 100644
--- a/llvm/lib/CodeGen/AsmPrinter/WinException.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/WinException.cpp
@@ -477,7 +477,8 @@ void WinException::emitCSpecificHandlerTable(const MachineFunction *MF) {
const MCExpr *ExceptOrNull;
auto *Handler = UME.Handler.get<MachineBasicBlock *>();
if (UME.IsFinally) {
- FilterOrFinally = create32bitRef(Handler->getSymbol());
+ FilterOrFinally =
+ create32bitRef(getMCSymbolForMBBOrGV(Asm, Handler));
ExceptOrNull = MCConstantExpr::create(0, Ctx);
} else {
// For an except, the filter can be 1 (catch-all) or a function
diff --git a/llvm/test/CodeGen/X86/seh-catchpad.ll b/llvm/test/CodeGen/X86/seh-catchpad.ll
index fc8e721c63d..865596d206f 100644
--- a/llvm/test/CodeGen/X86/seh-catchpad.ll
+++ b/llvm/test/CodeGen/X86/seh-catchpad.ll
@@ -140,7 +140,7 @@ ehcleanup.end: ; preds = %ehcleanup
; CHECK-NEXT: .long .LBB1_[[except2bb]]@IMGREL
; CHECK-NEXT: .long .Ltmp2@IMGREL
; CHECK-NEXT: .long .Ltmp3@IMGREL+1
-; CHECK-NEXT: .long .LBB1_[[finbb:[0-9]+]]@IMGREL
+; CHECK-NEXT: .long "?dtor$[[finbb:[0-9]+]]@?0?main@4HA"@IMGREL
; CHECK-NEXT: .long 0
; CHECK-NEXT: .long .Ltmp2@IMGREL
; CHECK-NEXT: .long .Ltmp3@IMGREL+1
OpenPOWER on IntegriCloud