[XCOFF] Don't emit non-external labels in the symbol table and handle MCSA_LGlobal
authorDavid Tenty <daltenty@ibm.com>
Thu, 27 Feb 2020 15:43:27 +0000 (10:43 -0500)
committerDavid Tenty <daltenty@ibm.com>
Thu, 27 Feb 2020 18:37:13 +0000 (13:37 -0500)
commitd32fa59fa007ba53b8453f96a5661b149e4715c7
treee90b608dcd68e8e9cbff3cbbb2205b257e15f18b
parentd4ad2adb0046ef5bc4276552f978b43446e9c0c2
[XCOFF] Don't emit non-external labels in the symbol table and handle MCSA_LGlobal

Summary:
We need to handle the  MCSA_LGlobal case in emitSymbolAttribute for functions marked internal in the IR so that the
appropriate storage class is emitted on the function descriptor csect.  As part of this we need to make sure that external
labels are not emitted into the symbol table, so we don't emit the descriptor label in the object writing path.

Reviewers: jasonliu, DiggerLin, hubert.reinterpretcast

Reviewed By: jasonliu

Subscribers: Xiangling_L, wuzish, nemanjai, hiraditya, jsji, llvm-commits

Tags: #llvm

Differential Revision: https://reviews.llvm.org/D74968
llvm/lib/MC/MCXCOFFStreamer.cpp
llvm/lib/MC/XCOFFObjectWriter.cpp
llvm/test/CodeGen/PowerPC/aix-internal.ll [new file with mode: 0644]
llvm/test/CodeGen/PowerPC/aix-xcoff-mergeable-const.ll
llvm/test/CodeGen/PowerPC/aix-xcoff-mergeable-str.ll