[PATCH] D83875: [XCOFF][AIX] Enable -ffunction-sections

Digger via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Wed Jul 15 12:05:27 PDT 2020


DiggerLin added inline comments.


================
Comment at: llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:2167
+  // XTY_ER property anyway.
+  if (TM.getFunctionSections() && !Func->isDeclaration() &&
+      isa<Function>(Func)) {
----------------
change  Func->isDeclaration() to Func->isDeclarationForLinker() ?


================
Comment at: llvm/lib/CodeGen/TargetLoweringObjectFileImpl.cpp:2169
+      isa<Function>(Func)) {
+    XCOFF::StorageClass SC =
+        TargetLoweringObjectFileXCOFF::getStorageClassForGlobal(Func);
----------------
SC only use  once.


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

https://reviews.llvm.org/D83875





More information about the llvm-commits mailing list