[PATCH] D76932: [AIX] emit .extern and .weak directive linkage

Digger via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Apr 15 13:47:02 PDT 2020


DiggerLin marked 8 inline comments as done.
DiggerLin added inline comments.


================
Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:441
+  case GlobalValue::ExternalWeakLinkage:
+    if (TM.getTargetTriple().isOSBinFormatXCOFF()) {
+      OutStreamer->emitSymbolAttribute(GVSym, MCSA_Weak);
----------------
jasonliu wrote:
> Maybe an assert on isOSBinFormatXCOFF is better?
> If not, could we remove the else and llvm_unreachable to let it fall through? Will it have warnings?
> Or we could just only remove `else` here.
yes. remove else , and let it fall through , there is a warning.


================
Comment at: llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp:1496
+
+    MCSymbol *Name = getSymbol(&F);
+    if (TM.getTargetTriple().isOSBinFormatXCOFF() && !F.isIntrinsic()) {
----------------
jasonliu wrote:
> This block of code and D78045 will have conflict. One of us will need to rebase.
the one who land later will rebase.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D76932





More information about the cfe-commits mailing list