[llvm] r249621 - [WinEH] Refer to filter funclets using their symbol-table symbol
David Majnemer via llvm-commits
llvm-commits at lists.llvm.org
Wed Oct 7 14:34:00 PDT 2015
Author: majnemer
Date: Wed Oct 7 16:34:00 2015
New Revision: 249621
URL: http://llvm.org/viewvc/llvm-project?rev=249621&view=rev
Log:
[WinEH] Refer to filter funclets using their symbol-table symbol
The relocation for the filter funclet will be against a symbol table
entry for a function instead of the section, making it easier to
understand what is going on.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/WinException.cpp
llvm/trunk/test/CodeGen/X86/seh-catchpad.ll
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/WinException.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/WinException.cpp?rev=249621&r1=249620&r2=249621&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/WinException.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/WinException.cpp Wed Oct 7 16:34:00 2015
@@ -477,7 +477,8 @@ void WinException::emitCSpecificHandlerT
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
Modified: llvm/trunk/test/CodeGen/X86/seh-catchpad.ll
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/CodeGen/X86/seh-catchpad.ll?rev=249621&r1=249620&r2=249621&view=diff
==============================================================================
--- llvm/trunk/test/CodeGen/X86/seh-catchpad.ll (original)
+++ llvm/trunk/test/CodeGen/X86/seh-catchpad.ll Wed Oct 7 16:34:00 2015
@@ -140,7 +140,7 @@ ehcleanup.end:
; CHECK-NEXT: .long .LBB1_[[except2bb]]@IMGREL
; CHECK-NEXT: .long .Ltmp2 at IMGREL
; CHECK-NEXT: .long .Ltmp3 at IMGREL+1
-; CHECK-NEXT: .long .LBB1_[[finbb:[0-9]+]]@IMGREL
+; CHECK-NEXT: .long "?dtor$[[finbb:[0-9]+]]@?0?main at 4HA"@IMGREL
; CHECK-NEXT: .long 0
; CHECK-NEXT: .long .Ltmp2 at IMGREL
; CHECK-NEXT: .long .Ltmp3 at IMGREL+1
More information about the llvm-commits
mailing list