[PATCH] D88615: [XCOFF] Enable explicit sections on AIX

Jason Liu via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 5 06:57:56 PST 2020


jasonliu added inline comments.


================
Comment at: llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:2088
     const GlobalObject *GO, SectionKind Kind, const TargetMachine &TM) const {
-  report_fatal_error("XCOFF explicit sections not yet implemented.");
+  StringRef SectionName = GO->getSection();
+  XCOFF::StorageMappingClass MappingClass;
----------------
DiggerLin wrote:
>   /// If this global does not have a custom section, this will be empty and the
>    /// default object file section (.text, .data, etc) will be used.
>    StringRef getSection() const {
>      return hasSection() ? getSectionImpl() : StringRef();
>    }
> 
> do we need to check whether the Section Name is empty ?
This functionality seems already handled in its caller: `TargetLoweringObjectFile::SectionForGlobal`, where it would return the default section if hasSection returns `false`.


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D88615/new/

https://reviews.llvm.org/D88615



More information about the llvm-commits mailing list