Skip to content

Commit

Permalink
[CodeGen] [WinException] Remove a redundant explicit section switch f…
Browse files Browse the repository at this point in the history
…or aarch64

The following EmitWinEHHandlerData() implicitly switches to .xdata, just
like on x86_64.

This became orphaned from the original code requiring it in
0b61d22 / https://reviews.llvm.org/D61095.

Differential Revision: https://reviews.llvm.org/D87447
  • Loading branch information
mstorsjo committed Sep 11, 2020
1 parent e38be70 commit 46416f0
Show file tree
Hide file tree
Showing 4 changed files with 1 addition and 13 deletions.
9 changes: 0 additions & 9 deletions llvm/lib/CodeGen/AsmPrinter/WinException.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -258,15 +258,6 @@ void WinException::endFuncletImpl() {
if (F.hasPersonalityFn())
Per = classifyEHPersonality(F.getPersonalityFn()->stripPointerCasts());

// On funclet exit, we emit a fake "function" end marker, so that the call
// to EmitWinEHHandlerData below can calculate the size of the funclet or
// function.
if (isAArch64) {
MCSection *XData = Asm->OutStreamer->getAssociatedXDataSection(
Asm->OutStreamer->getCurrentSectionOnly());
Asm->OutStreamer->SwitchSection(XData);
}

// Emit an UNWIND_INFO struct describing the prologue.
Asm->OutStreamer->EmitWinEHHandlerData();

Expand Down
1 change: 0 additions & 1 deletion llvm/test/CodeGen/AArch64/win64-jumptable.ll
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@ declare void @g(i32, i32)
; CHECK: .word .LBB0_3-.LJTI0_0
; CHECK: .word .LBB0_4-.LJTI0_0
; CHECK: .word .LBB0_5-.LJTI0_0
; CHECK: .section .xdata,"dr"
; CHECK: .seh_handlerdata
; CHECK: .text
; CHECK: .seh_endproc
Expand Down
3 changes: 1 addition & 2 deletions llvm/test/CodeGen/AArch64/wineh-mingw.ll
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ endtryfinally:
; WINEH: .seh_proc foo4
; WINEH: .seh_handler _d_eh_personality, @unwind, @except
; WINEH: ret
; WINEH: .section .xdata,"dr"
; WINEH-NEXT: .seh_handlerdata
; WINEH: .seh_handlerdata
; WINEH-NEXT: .text
; WINEH-NEXT: .seh_endproc
; WINEH: .section .xdata,"dr"
Expand Down
1 change: 0 additions & 1 deletion llvm/test/CodeGen/AArch64/wineh1.mir
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
# ASM: .seh_endepilogue

# ASM: .seh_endfunclet
# ASM: .section .xdata,"dr"
# ASM: .seh_handlerdata
# ASM: .text
# ASM: .seh_endproc
Expand Down

0 comments on commit 46416f0

Please sign in to comment.