This is extracted from D17555
Details
Diff Detail
- Repository
- rL LLVM
Event Timeline
lib/CodeGen/AsmPrinter/DwarfCFIException.cpp | ||
---|---|---|
46 ↗ | (On Diff #48970) | If this is the final override, you can probably call it with DwarfCFIExeptionBase::endFragment(); |
88 ↗ | (On Diff #48970) | nit: remove Regular |
136 ↗ | (On Diff #48970) | unnecessary code movement -- move endFunction down after endFragment |
158 ↗ | (On Diff #48970) | Move this assertion up and make it assert (F->hasPersonalityFn() && "Expect ... "); |
lib/CodeGen/AsmPrinter/DwarfException.h | ||
67 ↗ | (On Diff #48970) | 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 ↗ | (On Diff #48970) | I did not move this. It always was just after beginFunction. I can reorder to keep this out of the diff. |
158 ↗ | (On Diff #48970) | P is used down the road, so I'm not sure this makes sense. |
lib/CodeGen/AsmPrinter/DwarfException.h | ||
67 ↗ | (On Diff #48970) | There are defined as doing nothing in AsmPrinterHandler, so we are good here. |
lib/CodeGen/AsmPrinter/DwarfCFIException.cpp | ||
---|---|---|
149 ↗ | (On Diff #49099) | 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 ↗ | (On Diff #49099) | ./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 | ||
---|---|---|
61 ↗ | (On Diff #49112) | add forceEmitPersonality field here. |