I plan to use MCSection::getName() in D78138. Having the function in the base class is also convenient for debugging.
Details
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
llvm/include/llvm/MC/MCSectionMachO.h | ||
---|---|---|
25–26 | This data structure choice seems like the only thing preventing us from moving SectionName to the MCSection base class, and having a vanilla, non-virtual getName accessor. Want to try that instead? The only complication is that you have to stabilize the StringRef by using a substring of the string key in the MachOUniquingMap. |
lgtm, just comments on comments.
llvm/include/llvm/MC/MCSection.h | ||
---|---|---|
104 | Are we sure we are dropping .zdebug_* support? If we're not confident, maybe just say "TODO: Make this private when possible." | |
llvm/include/llvm/MC/MCSectionELF.h | ||
50–51 | Isn't it owned by MCContext::ELFUniquingMap? That's much less surprising, since MCContext is the class responsible for creating these objects. | |
63 | O_O exciting | |
llvm/include/llvm/MC/MCSectionWasm.h | ||
44 | I think it's MCContext again, I guess the ownership changed. |
Address comments
Thanks for review!
llvm/include/llvm/MC/MCSection.h | ||
---|---|---|
104 | Thanks, I'll reword it. grimar asked whether we can drop accepting .zdebug_* as input. I mentioned D61689 (which was reverted because we are relying on it... Eventually it is because of some integrated assembler difficulties) | |
llvm/include/llvm/MC/MCSectionELF.h | ||
50–51 | Thanks! Looks like the original comment was wrong.. | |
63 | For your amusement, this is a hack only used by the .debug_* -> .zdebug_* renaming. | |
llvm/include/llvm/MC/MCSectionWasm.h | ||
44 | It is a WasmSectionKey element in WasmUniquingMap (which is in MCContext) |
Are we sure we are dropping .zdebug_* support? If we're not confident, maybe just say "TODO: Make this private when possible."