[all-commits] [llvm/llvm-project] b75692: [AsmPrinter] Use the McASMInfo to determine if we ...

Sean Fertile via All-commits all-commits at lists.llvm.org
Fri Feb 14 12:21:05 PST 2020


  Branch: refs/heads/master
  Home:   https://github.com/llvm/llvm-project
  Commit: b75692c30e61b1a09a264034374963534c672e34
      https://github.com/llvm/llvm-project/commit/b75692c30e61b1a09a264034374963534c672e34
  Author: Sean Fertile <sd.fertile at gmail.com>
  Date:   2020-02-14 (Fri, 14 Feb 2020)

  Changed paths:
    M llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp

  Log Message:
  -----------
  [AsmPrinter] Use the McASMInfo to determine if we need descriptors.

In https://reviews.llvm.org/rG8b737688c21a9755cae14cb9343930e0882164ab I
switched the condition gating the creation of the descriptor symbol from
checking the MCAsmInfo if we need to support descriptors, to if the OS
was AIX. Technically the 2 should be interchangeable: if we are
targeting AIX then we need to emit XCOFF object files, and the MCAsmInfo
must return true for needing function descriptors.

This doesn't account for lit test with runsteps that only set the arch.
Eg: test/CodeGen/XCore/section-name.ll
which when run natively on AIX we end up with a target xcore-ibm-aix and
needFunctionDescriptors is false.

This patch reverts to using the MCAsmInfo and adds an assert that the
target OS must be AIX since that is the only target using the descriptor
hook.

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




More information about the All-commits mailing list