[PATCH] D71125: [AIX] Avoid unset csect assert for functions defined after their use in TOC

Hubert Tong via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Dec 10 07:33:22 PST 2019


hubert.reinterpretcast added a comment.

This patch might need splitting. At least the commit subject should encompass the scope more. Once the tests are added for weak external or internal linkage, the "drive-by" change will be sizable.



================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1902
 
-  // Handle initialized global variables.
-  if (GV) {
-    SectionKind GVKind = getObjFileLowering().getKindForGlobal(GV, TM);
-
+  // Handle initialized global variables and functions.
+  SectionKind GOKind = getObjFileLowering().getKindForGlobal(GO, TM);
----------------
The binding of "initialized" is unclear here. Do you mean "defined" functions?


================
Comment at: llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp:1910
+        .getXCOFFSection(XSym->getName(), XCOFF::XMC_DS, XCOFF::XTY_SD,
+                         XCOFF::C_EXT, SectionKind::getData())
+        ->getQualNameSymbol();
----------------
Note regarding the linkage here as well.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D71125





More information about the llvm-commits mailing list