[PATCH] D78251: [MC] Replace MCSection*::getName() with MCSection::getName(). NFC
Reid Kleckner via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Apr 15 18:14:28 PDT 2020
rnk accepted this revision.
rnk added a comment.
This revision is now accepted and ready to land.
lgtm, just comments on comments.
================
Comment at: llvm/include/llvm/MC/MCSection.h:104
+ // TODO Make Name private after we stop supporting generation of GNU-style
+ // .zdebug_* sections.
+ StringRef Name;
----------------
Are we sure we are dropping .zdebug_* support? If we're not confident, maybe just say "TODO: Make this private when possible."
================
Comment at: llvm/include/llvm/MC/MCSectionELF.h:50
- MCSectionELF(StringRef Section, unsigned type, unsigned flags, SectionKind K,
+ // The storage of Name is owned by TargetLoweringObjectFileELF's ELFUniqueMap.
+ MCSectionELF(StringRef Name, unsigned type, unsigned flags, SectionKind K,
----------------
Isn't it owned by `MCContext::ELFUniquingMap`? That's much less surprising, since MCContext is the class responsible for creating these objects.
================
Comment at: llvm/include/llvm/MC/MCSectionELF.h:63
+ // sections.
+ void setSectionName(StringRef Name) { this->Name = Name; }
----------------
O_O exciting
================
Comment at: llvm/include/llvm/MC/MCSectionWasm.h:44
+ // The storage of Name is owned by TargetLoweringObjectFileWasm's WasmUniqueMap.
friend class MCContext;
----------------
I think it's MCContext again, I guess the ownership changed.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D78251/new/
https://reviews.llvm.org/D78251
More information about the llvm-commits
mailing list