Details
- Reviewers
dexonsmith
Diff Detail
Event Timeline
lib/MC/StringTableBuilder.cpp | ||
---|---|---|
27 | So you can't have an out of line default destructor to hide it from the inliner or to act as vtable anchor? |
We shouldn't be dropping vtable anchors like this.
include/llvm/DebugInfo/CodeView/DebugSubsection.h | ||
---|---|---|
23 | This moves the vtable anchor from the implementation to the header, which bloats object files considerably and causes the symbol to be weak unnecessarily. | |
36 | This moves the vtable anchor. | |
include/llvm/DebugInfo/PDB/Native/DbiModuleDescriptor.h | ||
31 | This moves the vtable anchor. | |
include/llvm/MC/StringTableBuilder.h | ||
40 | This moves the vtable anchor. | |
include/llvm/ObjectYAML/MachOYAML.h | ||
57 | This moves the vtable anchor. | |
include/llvm/Support/FormatVariadicDetails.h | ||
25 | This moves the vtable anchor. |
https://llvm.org/docs/CodingStandards.html#provide-a-virtual-method-anchor-for-classes-in-headers
Well, learned something new today. I'll follow up with something that doesn't mess with the vtable anchors.
Bonus points if you can *add* vtable anchors to the classes that are missing them :).
Looking through other classes, I see that it is common to use an anchor() method as the vtable anchor. I think having it that way makes it more clear what the purpose of the out-of-line function definition is.
include/llvm/DebugInfo/PDB/Native/DbiModuleDescriptor.h | ||
---|---|---|
31 | None of these methods are virtual, so this shouldn't affect the vtable anchor or am I misreading the coding standard? |
This moves the vtable anchor from the implementation to the header, which bloats object files considerably and causes the symbol to be weak unnecessarily.