[all-commits] [llvm/llvm-project] 804269: [LLVM] Add exported visibility style for XCOFF

David Tenty via All-commits all-commits at lists.llvm.org
Thu Apr 28 11:56:46 PDT 2022


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: 8042699a3088280292066a2fb1869f372369301f
      https://github.com/llvm/llvm-project/commit/8042699a3088280292066a2fb1869f372369301f
  Author: David Tenty <daltenty at ibm.com>
  Date:   2022-04-28 (Thu, 28 Apr 2022)

  Changed paths:
    M llvm/docs/LangRef.rst
    M llvm/include/llvm/MC/MCAsmInfo.h
    M llvm/include/llvm/MC/MCDirectives.h
    M llvm/lib/MC/MCAsmStreamer.cpp
    M llvm/lib/MC/MCELFStreamer.cpp
    M llvm/lib/MC/MCMachOStreamer.cpp
    M llvm/lib/MC/MCWasmStreamer.cpp
    M llvm/lib/MC/MCXCOFFStreamer.cpp
    M llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp
    A llvm/test/CodeGen/PowerPC/aix-xcoff-exported-nondefault.ll
    M llvm/test/CodeGen/PowerPC/aix-xcoff-visibility.ll

  Log Message:
  -----------
  [LLVM] Add exported visibility style for XCOFF

For the AIX linker, under default options, global or weak symbols which
have no visibility bits set to zero (i.e. no visibility, similar to ELF
default) are only exported if specified on an export list provided to
the linker. So AIX has an additional visibility style called
"exported" which indicates to the linker that the symbol should
be explicitly globally exported.

This change maps "dllexport" in the LLVM IR to correspond to XCOFF
exported as we feel this best models the intended semantic (discussion
on the discourse RFC thread: https://discourse.llvm.org/t/rfc-adding-exported-visibility-style-to-the-ir-to-model-xcoff-exported-visibility/61853)
and allows us to enable writing this visibility for the AIX target
in the assembly path.

Reviewed By: DiggerLin

Differential Revision: https://reviews.llvm.org/D123951




More information about the All-commits mailing list