This is extracted from D17555
Details
Diff Detail
Event Timeline
lib/CodeGen/AsmPrinter/DwarfCFIException.cpp | ||
---|---|---|
46 | If this is the final override, you can probably call it with DwarfCFIExeptionBase::endFragment(); | |
88 | nit: remove Regular | |
136 | unnecessary code movement -- move endFunction down after endFragment | |
149 | Move this assertion up and make it assert (F->hasPersonalityFn() && "Expect ... "); | |
lib/CodeGen/AsmPrinter/DwarfException.h | ||
67 | Should this and the end function be declared in DwarfCFIExceptionBase? Note that there are two overrider classes to the Base class. |
lib/CodeGen/AsmPrinter/DwarfCFIException.cpp | ||
---|---|---|
136 | I did not move this. It always was just after beginFunction. I can reorder to keep this out of the diff. | |
149 | P is used down the road, so I'm not sure this makes sense. | |
lib/CodeGen/AsmPrinter/DwarfException.h | ||
67 | There are defined as doing nothing in AsmPrinterHandler, so we are good here. |
lib/CodeGen/AsmPrinter/DwarfCFIException.cpp | ||
---|---|---|
149 | if you do not assert F->hasPersonalityFn(), can F->getPersonalityFn() possibly return NULL -- then you will get segfault which is less desirable than asserting. | |
lib/CodeGen/AsmPrinter/DwarfException.h | ||
67 | ./lib/CodeGen/AsmPrinter/ARMException.cpp:39:ARMException::ARMException ARMException::ARMException(AsmPrinter *A) : DwarfCFIExceptionBase(A) { ..) ARMException class also derives from DwarfExceptionBase. If beginFragment()/endFragment() is not pushed into the base class, this class will have inherited the empty definition which is wrong. Correction -- only endFragment part is wrong -- endFragment is called in the base class implementation ... |
looks like a good NFC clean up. LGTM
lib/CodeGen/AsmPrinter/DwarfCFIException.cpp | ||
---|---|---|
56 | add forceEmitPersonality field here. |
If this is the final override, you can probably call it with
DwarfCFIExeptionBase::endFragment();