[PATCH] D13261: [WinEH] Teach AsmPrinter about funclets
Reid Kleckner via llvm-commits
llvm-commits at lists.llvm.org
Tue Sep 29 11:48:12 PDT 2015
rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.
lgtm, mostly test changes and comment changes.
================
Comment at: lib/CodeGen/AsmPrinter/AsmPrinter.cpp:2462
@@ -2461,1 +2461,3 @@
void AsmPrinter::EmitBasicBlockStart(const MachineBasicBlock &MBB) const {
+ // Emit pre-funclet information.
+ if (MBB.isEHFuncletEntry()) {
----------------
Maybe: `End the previous funclet and start a new one.`
================
Comment at: lib/CodeGen/AsmPrinter/WinException.cpp:181
@@ +180,3 @@
+ // Describe our funclet symbol as a function with internal linkage.
+ Asm->OutStreamer->BeginCOFFSymbolDef(Sym);
+ Asm->OutStreamer->EmitCOFFSymbolStorageClass(COFF::IMAGE_SYM_CLASS_STATIC);
----------------
We should conditionalize this on `Subtarget->isTargetCOFF()` to make things easy for LLILAC.
================
Comment at: test/CodeGen/X86/win-catchpad.ll:81
@@ -80,3 +80,3 @@
-; X86: [[catch1bb:LBB0_[0-9]+]]: # %catch{{$}}
; X86: pushl %ebp
----------------
Can you keep the line that matches the IR-level basic block name comment? That helps keep the test tight, since there are two handlers. I assume the LBBN_M label comes immediately afterwards.
================
Comment at: test/CodeGen/X86/win-cleanuppad.ll:68
@@ -67,3 +67,3 @@
-; X86: LBB1_[[cleanup_inner:[0-9]+]]: # %cleanup.inner
+; X86: "?dtor$[[cleanup_inner:[0-9]+]]@?0?nested_cleanup at 4HA":
; X86: pushl %ebp
----------------
ditto re IR-level basic block names.
================
Comment at: test/CodeGen/X86/win-cleanuppad.ll:100
@@ -99,3 +99,3 @@
; X64: .Lfunc_begin1:
-; X64: .Ltmp8:
+; X64: .Ltmp14:
; X64: movl $1, %ecx
----------------
We should really change the asm label names we use for invokes to make it easier to FileCheck. Anyway, nothing to do here.
http://reviews.llvm.org/D13261
More information about the llvm-commits
mailing list