[PATCH] D78251: [MC] Add virtual member function MCSection::getName(). NFC

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Apr 15 16:34:11 PDT 2020


rnk added inline comments.


================
Comment at: llvm/include/llvm/MC/MCSectionMachO.h:25-26
 class MCSectionMachO final : public MCSection {
   char SegmentName[16];  // Not necessarily null terminated!
   char SectionName[16];  // Not necessarily null terminated!
 
----------------
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.


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