Revert "[AIX] Avoid structor alias; die before bad alias codegen"

Avoiding structor alias is no longer needed because AIX now has an alias implementation here: https://reviews.llvm.org/D83252.

This reverts commit b116ded57d.

Reviewed By: jasonliu

Differential Revision: https://reviews.llvm.org/D102724
This commit is contained in:
Jake Egan 2021-05-25 15:06:59 -04:00 committed by Steven Wan
parent 6300c37a46
commit 5bc644aeca
2 changed files with 4 additions and 6 deletions

View File

@ -5028,10 +5028,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
// Enable -mconstructor-aliases except on darwin, where we have to work around
// a linker bug (see <rdar://problem/7651567>), and CUDA/AMDGPU device code,
// where aliases aren't supported. Similarly, aliases aren't yet supported
// for AIX.
if (!RawTriple.isOSDarwin() && !RawTriple.isNVPTX() &&
!RawTriple.isAMDGPU() && !RawTriple.isOSAIX())
// where aliases aren't supported.
if (!RawTriple.isOSDarwin() && !RawTriple.isNVPTX() && !RawTriple.isAMDGPU())
CmdArgs.push_back("-mconstructor-aliases");
// Darwin's kernel doesn't support guard variables; just die if we

View File

@ -1,7 +1,7 @@
// Check that we don't pass -mconstructor-aliases when compiling for AIX.
// Check that we pass -mconstructor-aliases when compiling for AIX.
// RUN: %clang -### -target powerpc-ibm-aix7.1.0.0 %s -c -o %t.o 2>&1 \
// RUN: | FileCheck %s
// RUN: %clang -### -target powerpc64-ibm-aix7.1.0.0 %s -c -o %t.o 2>&1 \
// RUN: | FileCheck %s
// CHECK-NOT: "-mconstructor-aliases"
// CHECK: "-mconstructor-aliases"