[PATCH] D17580: Extract the method to begin and end a fragment in AsmPrinterHandler in their own method. NFC
Amaury SECHET via llvm-commits
llvm-commits at lists.llvm.org
Thu Feb 25 11:09:50 PST 2016
deadalnix added inline comments.
Comment at: lib/CodeGen/AsmPrinter/DwarfCFIException.cpp:136
@@ +135,3 @@
+/// endFunction - Gather and emit post-function exception information.
> unnecessary code movement -- move endFunction down after endFragment
I did not move this. It always was just after beginFunction. I can reorder to keep this out of the diff.
Comment at: lib/CodeGen/AsmPrinter/DwarfCFIException.cpp:158
@@ +157,3 @@
+ auto *P = dyn_cast<Function>(F->getPersonalityFn()->stripPointerCasts());
+ assert(P && "Expected personality function");
> Move this assertion up and make it assert (F->hasPersonalityFn() && "Expect ... ");
P is used down the road, so I'm not sure this makes sense.
Comment at: lib/CodeGen/AsmPrinter/DwarfException.h:67
@@ +66,3 @@
+ void beginFragment(const MachineBasicBlock *MBB,
+ ExceptionSymbolProvider ESP) override;
> Should this and the end function be declared in DwarfCFIExceptionBase? Note that there are two overrider classes to the Base class.
There are defined as doing nothing in AsmPrinterHandler, so we are good here.
More information about the llvm-commits