Take care of some missing clean-ups that belong with r249548 and some other copy/paste that had happened. In particular, the destructors are no longer vtable anchors after r249548; and setSectionName in MCSectionWasm is private and unused since r313058 culled its only caller. The destructors are now implicitly defined, and the unused function is removed.
Details
Diff Detail
- Repository
- rL LLVM
- Build Status
Buildable 27266 Build 27265: arc lint + arc unit
Event Timeline
This looks to me like the right thing to do but I added Jim Grosbach as a reviewer since he owns the MC layer.
lib/MC/MCSectionCOFF.cpp | ||
---|---|---|
17 | If its not longer an anchor then presumably it can be removed from the .cpp file? And in fact since its empty removed from the .h file too? Ditto for ELF and wasm files. |
lib/MC/MCSectionCOFF.cpp | ||
---|---|---|
17 | Yes, I think I will do that. It does not look like these destructors do much other than calling the base destructor, and the base destructor is already out-of-line. |
lgtm.
I assume its safe to remove the destructors here as they were only used for anchors and these class have other virtual functions in the cpp files already. The rules for anchor methods are here: https://llvm.org/docs/CodingStandards.html#provide-a-virtual-method-anchor-for-classes-in-headers.
If its not longer an anchor then presumably it can be removed from the .cpp file? And in fact since its empty removed from the .h file too?
Ditto for ELF and wasm files.