[clang] [driver][test] Only check for unused plugin options (PR #91522)
https://github.com/jakeegan closed https://github.com/llvm/llvm-project/pull/91522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [driver][test] Only check for unused plugin options (PR #91522)
jakeegan wrote: CI failure doesn't seem to be related https://github.com/llvm/llvm-project/pull/91522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [driver][test] Only check for unused plugin options (PR #91522)
https://github.com/jakeegan edited https://github.com/llvm/llvm-project/pull/91522 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [driver] Only check for unused plugin options (PR #91522)
https://github.com/jakeegan updated https://github.com/llvm/llvm-project/pull/91522 >From 7684f9e6f99c30287f2822152dc83367a934d8b6 Mon Sep 17 00:00:00 2001 From: Jake Egan Date: Wed, 8 May 2024 15:09:46 -0400 Subject: [PATCH 1/2] [driver] Only check for unused plugin options This fixes matching `clang: error: argument unused during compilation: '-Werror' [-Werror,-Wunused-command-line-argument]` on AIX. --- clang/test/Driver/plugin-driver-args.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/test/Driver/plugin-driver-args.cpp b/clang/test/Driver/plugin-driver-args.cpp index 6f0e6e2ba7525..7667cc4ce7b00 100644 --- a/clang/test/Driver/plugin-driver-args.cpp +++ b/clang/test/Driver/plugin-driver-args.cpp @@ -23,5 +23,5 @@ // Plugins are only relevant for the -cc1 phase. No warning should be raised // when only using the assembler. See GH #88173. -// RUN: %clang -c -fpass-plugin=bar.so -fplugin=bar.so -fplugin-arg-bar-option -Werror -x assembler %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-PLUGIN-ASM -// CHECK-PLUGIN-ASM-NOT: argument unused during compilation +// RUN: %clang -c -fpass-plugin=bar.so -fplugin=bar.so -fplugin-arg-bar-option -Wunused-command-line-argument -x assembler %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-PLUGIN-ASM +// CHECK-PLUGIN-ASM-NOT: argument unused during compilation: '-f{{[a-z-]*-plugin[^']*}}' >From 223b76b9419db53286b3b5bdc74de985c1d7b794 Mon Sep 17 00:00:00 2001 From: Jake Egan Date: Wed, 8 May 2024 20:51:43 -0400 Subject: [PATCH 2/2] Check for -fplugin* Co-authored-by: Hubert Tong --- clang/test/Driver/plugin-driver-args.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/clang/test/Driver/plugin-driver-args.cpp b/clang/test/Driver/plugin-driver-args.cpp index 7667cc4ce7b00..6efd859f9d085 100644 --- a/clang/test/Driver/plugin-driver-args.cpp +++ b/clang/test/Driver/plugin-driver-args.cpp @@ -24,4 +24,4 @@ // Plugins are only relevant for the -cc1 phase. No warning should be raised // when only using the assembler. See GH #88173. // RUN: %clang -c -fpass-plugin=bar.so -fplugin=bar.so -fplugin-arg-bar-option -Wunused-command-line-argument -x assembler %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-PLUGIN-ASM -// CHECK-PLUGIN-ASM-NOT: argument unused during compilation: '-f{{[a-z-]*-plugin[^']*}}' +// CHECK-PLUGIN-ASM-NOT: argument unused during compilation: '-f{{[a-z-]*plugin[^']*}}' ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [driver] Only check for unused plugin options (PR #91522)
https://github.com/jakeegan created https://github.com/llvm/llvm-project/pull/91522 This fixes matching `clang: error: argument unused during compilation: '-Werror' [-Werror,-Wunused-command-line-argument]` on AIX. >From 7684f9e6f99c30287f2822152dc83367a934d8b6 Mon Sep 17 00:00:00 2001 From: Jake Egan Date: Wed, 8 May 2024 15:09:46 -0400 Subject: [PATCH] [driver] Only check for unused plugin options This fixes matching `clang: error: argument unused during compilation: '-Werror' [-Werror,-Wunused-command-line-argument]` on AIX. --- clang/test/Driver/plugin-driver-args.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/clang/test/Driver/plugin-driver-args.cpp b/clang/test/Driver/plugin-driver-args.cpp index 6f0e6e2ba7525..7667cc4ce7b00 100644 --- a/clang/test/Driver/plugin-driver-args.cpp +++ b/clang/test/Driver/plugin-driver-args.cpp @@ -23,5 +23,5 @@ // Plugins are only relevant for the -cc1 phase. No warning should be raised // when only using the assembler. See GH #88173. -// RUN: %clang -c -fpass-plugin=bar.so -fplugin=bar.so -fplugin-arg-bar-option -Werror -x assembler %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-PLUGIN-ASM -// CHECK-PLUGIN-ASM-NOT: argument unused during compilation +// RUN: %clang -c -fpass-plugin=bar.so -fplugin=bar.so -fplugin-arg-bar-option -Wunused-command-line-argument -x assembler %s -### 2>&1 | FileCheck %s --check-prefix=CHECK-PLUGIN-ASM +// CHECK-PLUGIN-ASM-NOT: argument unused during compilation: '-f{{[a-z-]*-plugin[^']*}}' ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [driver] Do not warn about unused plugin flags. (PR #88948)
jakeegan wrote: Hi, the test plugin-driver-args.cpp is failing on AIX now, could you take a look please? https://lab.llvm.org/buildbot/#/builders/214/builds/12118/steps/6/logs/FAIL__Clang__plugin-driver-args_cpp https://github.com/llvm/llvm-project/pull/88948 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][AIX] set OpenMP include path (PR #88545)
https://github.com/jakeegan closed https://github.com/llvm/llvm-project/pull/88545 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][AIX] set OpenMP include path (PR #88545)
https://github.com/jakeegan updated https://github.com/llvm/llvm-project/pull/88545 >From 4be38409fa322765c21a94759a78a23700e1a54d Mon Sep 17 00:00:00 2001 From: Jake Egan Date: Fri, 12 Apr 2024 11:36:25 -0400 Subject: [PATCH 1/2] [clang][AIX] set OpenMP include path --- clang/lib/Driver/ToolChains/AIX.cpp | 28 + clang/lib/Driver/ToolChains/AIX.h | 2 ++ clang/test/Driver/aix-toolchain-include.cpp | 20 ++- 3 files changed, 49 insertions(+), 1 deletion(-) diff --git a/clang/lib/Driver/ToolChains/AIX.cpp b/clang/lib/Driver/ToolChains/AIX.cpp index 3f10888596a29a..f1ad65884dca26 100644 --- a/clang/lib/Driver/ToolChains/AIX.cpp +++ b/clang/lib/Driver/ToolChains/AIX.cpp @@ -362,6 +362,29 @@ AIX::GetHeaderSysroot(const llvm::opt::ArgList ) const { return "/"; } +void AIX::AddOpenMPIncludeArgs(const ArgList , + ArgStringList ) const { + // Add OpenMP include paths if -fopenmp is specified. + if (DriverArgs.hasFlag(options::OPT_fopenmp, options::OPT_fopenmp_EQ, + options::OPT_fno_openmp, false)) { +SmallString<128> PathOpenMP; +switch (getDriver().getOpenMPRuntime(DriverArgs)) { +case Driver::OMPRT_OMP: + PathOpenMP = GetHeaderSysroot(DriverArgs); + llvm::sys::path::append(PathOpenMP, "opt/IBM/openxlCSDK", "include", "openmp"); + addSystemInclude(DriverArgs, CC1Args, PathOpenMP.str()); + break; +case Driver::OMPRT_IOMP5: + LLVM_FALLTHROUGH; +case Driver::OMPRT_GOMP: + LLVM_FALLTHROUGH; +case Driver::OMPRT_Unknown: + // Unknown / unsupported include paths. + break; +} + } +} + void AIX::AddClangSystemIncludeArgs(const ArgList , ArgStringList ) const { // Return if -nostdinc is specified as a driver option. @@ -380,6 +403,11 @@ void AIX::AddClangSystemIncludeArgs(const ArgList , addSystemInclude(DriverArgs, CC1Args, path::parent_path(P.str())); } + // Add the include directory containing omp.h. This needs to be before + // adding the system include directory because other compilers put their + // omp.h in /usr/include. + AddOpenMPIncludeArgs(DriverArgs, CC1Args); + // Return if -nostdlibinc is specified as a driver option. if (DriverArgs.hasArg(options::OPT_nostdlibinc)) return; diff --git a/clang/lib/Driver/ToolChains/AIX.h b/clang/lib/Driver/ToolChains/AIX.h index 755d87e07ec500..8f130f6b54547c 100644 --- a/clang/lib/Driver/ToolChains/AIX.h +++ b/clang/lib/Driver/ToolChains/AIX.h @@ -105,6 +105,8 @@ class LLVM_LIBRARY_VISIBILITY AIX : public ToolChain { private: llvm::StringRef GetHeaderSysroot(const llvm::opt::ArgList ) const; bool ParseInlineAsmUsingAsmParser; + void AddOpenMPIncludeArgs(const llvm::opt::ArgList , +llvm::opt::ArgStringList ) const; }; } // end namespace toolchains diff --git a/clang/test/Driver/aix-toolchain-include.cpp b/clang/test/Driver/aix-toolchain-include.cpp index fbe5fb8cb86131..31dc4fa9eb6a19 100644 --- a/clang/test/Driver/aix-toolchain-include.cpp +++ b/clang/test/Driver/aix-toolchain-include.cpp @@ -5,24 +5,28 @@ // RUN:--target=powerpc-ibm-aix \ // RUN:-resource-dir=%S/Inputs/resource_dir \ // RUN:--sysroot=%S/Inputs/basic_aix_tree \ +// RUN: -fopenmp \ // RUN: | FileCheck -check-prefixes=CHECK-INTERNAL-INCLUDE,CHECK-INTERNAL-INCLUDE-CXX %s // RUN: %clangxx -### %s 2>&1 \ // RUN:--target=powerpc64-ibm-aix \ // RUN:-resource-dir=%S/Inputs/resource_dir \ // RUN:--sysroot=%S/Inputs/basic_aix_tree \ +// RUN: -fopenmp \ // RUN: | FileCheck -check-prefixes=CHECK-INTERNAL-INCLUDE,CHECK-INTERNAL-INCLUDE-CXX %s // RUN: %clang -### -xc %s 2>&1 \ // RUN:--target=powerpc-ibm-aix \ // RUN:-resource-dir=%S/Inputs/resource_dir \ // RUN:--sysroot=%S/Inputs/basic_aix_tree \ +// RUN: -fopenmp \ // RUN: | FileCheck -check-prefix=CHECK-INTERNAL-INCLUDE %s // RUN: %clang -### -xc %s 2>&1 \ // RUN:--target=powerpc64-ibm-aix \ // RUN:-resource-dir=%S/Inputs/resource_dir \ // RUN:--sysroot=%S/Inputs/basic_aix_tree \ +// RUN: -fopenmp \ // RUN: | FileCheck -check-prefix=CHECK-INTERNAL-INCLUDE %s // CHECK-INTERNAL-INCLUDE: "-cc1" @@ -31,6 +35,7 @@ // CHECK-INTERNAL-INCLUDE-CXX: "-internal-isystem" "[[SYSROOT]]{{(/|)}}opt{{(/|)}}IBM{{(/|)}}openxlCSDK{{(/|)}}include{{(/|)}}c++{{(/|)}}v1" // CHECK-INTERNAL-INCLUDE-CXX: "-D__LIBC_NO_CPP_MATH_OVERLOADS__" // CHECK-INTERNAL-INCLUDE: "-internal-isystem" "[[RESOURCE_DIR]]{{(/|)}}include" +// CHECK-INTERNAL-INCLUDE: "-internal-isystem" "[[SYSROOT]]{{(/|)}}opt{{(/|)}}IBM{{(/|)}}openxlCSDK{{(/|)}}include{{(/|)}}openmp" // CHECK-INTERNAL-INCLUDE:
[clang] [clang][AIX] set OpenMP include path (PR #88545)
https://github.com/jakeegan created https://github.com/llvm/llvm-project/pull/88545 Add include directory for omp.h at `/opt/IBM/openxlCSDK/include/openmp`. >From 4be38409fa322765c21a94759a78a23700e1a54d Mon Sep 17 00:00:00 2001 From: Jake Egan Date: Fri, 12 Apr 2024 11:36:25 -0400 Subject: [PATCH] [clang][AIX] set OpenMP include path --- clang/lib/Driver/ToolChains/AIX.cpp | 28 + clang/lib/Driver/ToolChains/AIX.h | 2 ++ clang/test/Driver/aix-toolchain-include.cpp | 20 ++- 3 files changed, 49 insertions(+), 1 deletion(-) diff --git a/clang/lib/Driver/ToolChains/AIX.cpp b/clang/lib/Driver/ToolChains/AIX.cpp index 3f10888596a29a..f1ad65884dca26 100644 --- a/clang/lib/Driver/ToolChains/AIX.cpp +++ b/clang/lib/Driver/ToolChains/AIX.cpp @@ -362,6 +362,29 @@ AIX::GetHeaderSysroot(const llvm::opt::ArgList ) const { return "/"; } +void AIX::AddOpenMPIncludeArgs(const ArgList , + ArgStringList ) const { + // Add OpenMP include paths if -fopenmp is specified. + if (DriverArgs.hasFlag(options::OPT_fopenmp, options::OPT_fopenmp_EQ, + options::OPT_fno_openmp, false)) { +SmallString<128> PathOpenMP; +switch (getDriver().getOpenMPRuntime(DriverArgs)) { +case Driver::OMPRT_OMP: + PathOpenMP = GetHeaderSysroot(DriverArgs); + llvm::sys::path::append(PathOpenMP, "opt/IBM/openxlCSDK", "include", "openmp"); + addSystemInclude(DriverArgs, CC1Args, PathOpenMP.str()); + break; +case Driver::OMPRT_IOMP5: + LLVM_FALLTHROUGH; +case Driver::OMPRT_GOMP: + LLVM_FALLTHROUGH; +case Driver::OMPRT_Unknown: + // Unknown / unsupported include paths. + break; +} + } +} + void AIX::AddClangSystemIncludeArgs(const ArgList , ArgStringList ) const { // Return if -nostdinc is specified as a driver option. @@ -380,6 +403,11 @@ void AIX::AddClangSystemIncludeArgs(const ArgList , addSystemInclude(DriverArgs, CC1Args, path::parent_path(P.str())); } + // Add the include directory containing omp.h. This needs to be before + // adding the system include directory because other compilers put their + // omp.h in /usr/include. + AddOpenMPIncludeArgs(DriverArgs, CC1Args); + // Return if -nostdlibinc is specified as a driver option. if (DriverArgs.hasArg(options::OPT_nostdlibinc)) return; diff --git a/clang/lib/Driver/ToolChains/AIX.h b/clang/lib/Driver/ToolChains/AIX.h index 755d87e07ec500..8f130f6b54547c 100644 --- a/clang/lib/Driver/ToolChains/AIX.h +++ b/clang/lib/Driver/ToolChains/AIX.h @@ -105,6 +105,8 @@ class LLVM_LIBRARY_VISIBILITY AIX : public ToolChain { private: llvm::StringRef GetHeaderSysroot(const llvm::opt::ArgList ) const; bool ParseInlineAsmUsingAsmParser; + void AddOpenMPIncludeArgs(const llvm::opt::ArgList , +llvm::opt::ArgStringList ) const; }; } // end namespace toolchains diff --git a/clang/test/Driver/aix-toolchain-include.cpp b/clang/test/Driver/aix-toolchain-include.cpp index fbe5fb8cb86131..31dc4fa9eb6a19 100644 --- a/clang/test/Driver/aix-toolchain-include.cpp +++ b/clang/test/Driver/aix-toolchain-include.cpp @@ -5,24 +5,28 @@ // RUN:--target=powerpc-ibm-aix \ // RUN:-resource-dir=%S/Inputs/resource_dir \ // RUN:--sysroot=%S/Inputs/basic_aix_tree \ +// RUN: -fopenmp \ // RUN: | FileCheck -check-prefixes=CHECK-INTERNAL-INCLUDE,CHECK-INTERNAL-INCLUDE-CXX %s // RUN: %clangxx -### %s 2>&1 \ // RUN:--target=powerpc64-ibm-aix \ // RUN:-resource-dir=%S/Inputs/resource_dir \ // RUN:--sysroot=%S/Inputs/basic_aix_tree \ +// RUN: -fopenmp \ // RUN: | FileCheck -check-prefixes=CHECK-INTERNAL-INCLUDE,CHECK-INTERNAL-INCLUDE-CXX %s // RUN: %clang -### -xc %s 2>&1 \ // RUN:--target=powerpc-ibm-aix \ // RUN:-resource-dir=%S/Inputs/resource_dir \ // RUN:--sysroot=%S/Inputs/basic_aix_tree \ +// RUN: -fopenmp \ // RUN: | FileCheck -check-prefix=CHECK-INTERNAL-INCLUDE %s // RUN: %clang -### -xc %s 2>&1 \ // RUN:--target=powerpc64-ibm-aix \ // RUN:-resource-dir=%S/Inputs/resource_dir \ // RUN:--sysroot=%S/Inputs/basic_aix_tree \ +// RUN: -fopenmp \ // RUN: | FileCheck -check-prefix=CHECK-INTERNAL-INCLUDE %s // CHECK-INTERNAL-INCLUDE: "-cc1" @@ -31,6 +35,7 @@ // CHECK-INTERNAL-INCLUDE-CXX: "-internal-isystem" "[[SYSROOT]]{{(/|)}}opt{{(/|)}}IBM{{(/|)}}openxlCSDK{{(/|)}}include{{(/|)}}c++{{(/|)}}v1" // CHECK-INTERNAL-INCLUDE-CXX: "-D__LIBC_NO_CPP_MATH_OVERLOADS__" // CHECK-INTERNAL-INCLUDE: "-internal-isystem" "[[RESOURCE_DIR]]{{(/|)}}include" +// CHECK-INTERNAL-INCLUDE: "-internal-isystem"
[clang] [clang][AIX] Only export libclang.map symbols from libclang (PR #78748)
jakeegan wrote: @jansvoboda11 Thanks again for investigating! https://github.com/llvm/llvm-project/pull/78748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][AIX] Only export libclang.map symbols from libclang (PR #78748)
https://github.com/jakeegan closed https://github.com/llvm/llvm-project/pull/78748 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][AIX] Only export libclang.map symbols from libclang (PR #78748)
https://github.com/jakeegan created https://github.com/llvm/llvm-project/pull/78748 This will prevent unnecessary symbols being exported in libclang, which could cause issues with non-unique objects. >From a51256cdab8a04474d4ae168d969516af1878c29 Mon Sep 17 00:00:00 2001 From: Jake Egan <5326451+jakee...@users.noreply.github.com> Date: Fri, 19 Jan 2024 11:42:14 -0500 Subject: [PATCH] [clang][AIX] Only export libclang.map symbols from libclang --- clang/test/Index/Core/designated-inits.c | 1 - clang/test/Index/Core/external-source-symbol-attr-cxx.cpp | 1 - clang/test/Index/Core/external-source-symbol-attr.m | 1 - clang/test/Index/Core/index-dependent-source.cpp | 1 - clang/test/Index/Core/index-instantiated-source.cpp | 1 - clang/test/Index/Core/index-source-invalid-name.cpp | 1 - clang/test/Index/Core/index-source.cpp| 1 - clang/test/Index/Core/index-source.m | 1 - clang/test/Index/Core/index-source.mm | 1 - clang/test/Index/Core/index-subkinds.m| 1 - clang/test/Index/Core/index-with-module.m | 1 - clang/test/Index/ms-property.cpp | 1 - clang/test/Index/using_if_exists.cpp | 1 - clang/tools/libclang/CMakeLists.txt | 5 +++-- 14 files changed, 3 insertions(+), 15 deletions(-) diff --git a/clang/test/Index/Core/designated-inits.c b/clang/test/Index/Core/designated-inits.c index 10f48c68915fe4d..a31cb95a4b82db7 100644 --- a/clang/test/Index/Core/designated-inits.c +++ b/clang/test/Index/Core/designated-inits.c @@ -1,4 +1,3 @@ -// XFAIL: target={{.*}}-aix{{.*}} // RUN: c-index-test core -print-source-symbols -- %s -target x86_64-apple-macosx10.7 | FileCheck %s struct MyStruct { diff --git a/clang/test/Index/Core/external-source-symbol-attr-cxx.cpp b/clang/test/Index/Core/external-source-symbol-attr-cxx.cpp index b3fb31c54a74208..8ccf3c7d69496bd 100644 --- a/clang/test/Index/Core/external-source-symbol-attr-cxx.cpp +++ b/clang/test/Index/Core/external-source-symbol-attr-cxx.cpp @@ -1,4 +1,3 @@ -// XFAIL: target={{.*}}-aix{{.*}} // RUN: c-index-test core -print-source-symbols -- %s -target x86_64-apple-macosx10.7 | FileCheck %s #define GEN_DECL_USR(mod_name, usr) __attribute__((external_source_symbol(language="Swift", defined_in=mod_name, USR=usr, generated_declaration))) diff --git a/clang/test/Index/Core/external-source-symbol-attr.m b/clang/test/Index/Core/external-source-symbol-attr.m index fee80d3b0fdf6ca..1f907912737b0d7 100644 --- a/clang/test/Index/Core/external-source-symbol-attr.m +++ b/clang/test/Index/Core/external-source-symbol-attr.m @@ -1,4 +1,3 @@ -// XFAIL: target={{.*}}-aix{{.*}} // RUN: c-index-test core -print-source-symbols -- %s -target x86_64-apple-macosx10.7 | FileCheck %s #define EXT_DECL(mod_name) __attribute__((external_source_symbol(language="Swift", defined_in=mod_name))) diff --git a/clang/test/Index/Core/index-dependent-source.cpp b/clang/test/Index/Core/index-dependent-source.cpp index eabec29a1fd7b30..8fec9abd1e926b9 100644 --- a/clang/test/Index/Core/index-dependent-source.cpp +++ b/clang/test/Index/Core/index-dependent-source.cpp @@ -1,4 +1,3 @@ -// XFAIL: target={{.*}}-aix{{.*}} // RUN: c-index-test core -print-source-symbols -- %s -std=c++14 -target x86_64-apple-macosx10.7 | FileCheck %s int invalid; diff --git a/clang/test/Index/Core/index-instantiated-source.cpp b/clang/test/Index/Core/index-instantiated-source.cpp index ccb39019ef06741..2a67a3a3c7938e3 100644 --- a/clang/test/Index/Core/index-instantiated-source.cpp +++ b/clang/test/Index/Core/index-instantiated-source.cpp @@ -1,4 +1,3 @@ -// XFAIL: target={{.*}}-aix{{.*}} // RUN: c-index-test core -print-source-symbols -- %s -std=c++14 -target x86_64-apple-macosx10.7 | FileCheck %s // References to declarations in instantiations should be canonicalized: diff --git a/clang/test/Index/Core/index-source-invalid-name.cpp b/clang/test/Index/Core/index-source-invalid-name.cpp index 034fd6b7009b6b7..1b4b059cd1b36dc 100644 --- a/clang/test/Index/Core/index-source-invalid-name.cpp +++ b/clang/test/Index/Core/index-source-invalid-name.cpp @@ -1,4 +1,3 @@ -// XFAIL: target={{.*}}-aix{{.*}} // RUN: c-index-test core -print-source-symbols -- %s -std=c++1z -target x86_64-apple-macosx10.7 | FileCheck %s namespace rdar32474406 { diff --git a/clang/test/Index/Core/index-source.cpp b/clang/test/Index/Core/index-source.cpp index ed7474499dc7299..8f9fbc4c8d29c4a 100644 --- a/clang/test/Index/Core/index-source.cpp +++ b/clang/test/Index/Core/index-source.cpp @@ -1,4 +1,3 @@ -// XFAIL: target={{.*}}-aix{{.*}} // RUN: c-index-test core -print-source-symbols -- %s -std=c++1z -target x86_64-apple-macosx10.7 | FileCheck %s // RUN: c-index-test core -print-source-symbols -include-locals -- %s -std=c++1z -target x86_64-apple-macosx10.7 | FileCheck -check-prefix=LOCAL %s diff
[clang] [llvm] [clang][Driver] Don't ignore -gmodules .gch files (PR #77711)
jakeegan wrote: Hi, on AIX we are seeing ``` error: input is not a PCH file: '/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/PCH/Output/gch-probe.c.tmp.h.gch' fatal error: file '/home/powerllvm/powerllvm_env/aix-ppc64/clang-ppc64-aix/build/tools/clang/test/PCH/Output/gch-probe.c.tmp.h.gch' is not a valid precompiled PCH file: file too small to contain AST file magic ``` https://lab.llvm.org/buildbot/#/builders/214/builds/11018/steps/6/logs/FAIL__Clang__gch-probe_c Could you take a look please? https://github.com/llvm/llvm-project/pull/77711 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][modules] Objective-C test lacks support on AIX/zOS (PR #77485)
https://github.com/jakeegan closed https://github.com/llvm/llvm-project/pull/77485 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][modules] Objective-C test lacks support on AIX/zOS (PR #77485)
https://github.com/jakeegan created https://github.com/llvm/llvm-project/pull/77485 To fix error: `fatal error: error in backend: Objective-C support is unimplemented for object file format` Same rationale as 22f01cd. >From 31a0c7bbdf0d512bf676805ed11e19ea4a28c7d0 Mon Sep 17 00:00:00 2001 From: Jake Egan <5326451+jakee...@users.noreply.github.com> Date: Tue, 9 Jan 2024 10:10:53 -0500 Subject: [PATCH] [clang][modules] Objective-C test lacks support on AIX/zOS --- clang/test/Modules/autolink_private_module.m | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clang/test/Modules/autolink_private_module.m b/clang/test/Modules/autolink_private_module.m index 54bebc3a587b1b..b96c2aed12bf81 100644 --- a/clang/test/Modules/autolink_private_module.m +++ b/clang/test/Modules/autolink_private_module.m @@ -1,3 +1,5 @@ +// UNSUPPORTED: target={{.*}}-zos{{.*}}, target={{.*}}-aix{{.*}} + // Test that autolink hints for frameworks don't use the private module name. // RUN: rm -rf %t && mkdir %t // RUN: split-file %s %t ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [AIX] Disable flaky ClangScanDeps tests (PR #72304)
https://github.com/jakeegan closed https://github.com/llvm/llvm-project/pull/72304 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [AIX] Disable flaky ClangScanDeps tests (PR #72304)
https://github.com/jakeegan created https://github.com/llvm/llvm-project/pull/72304 These tests are failing intermittently on the AIX bot, possibly due to some issue with `getpwuid_r`. Disable them for now while they are investigated. >From 4bec41bbb8a197ecb4d2b12a842ec6f212c00db4 Mon Sep 17 00:00:00 2001 From: Jake Egan <5326451+jakee...@users.noreply.github.com> Date: Tue, 14 Nov 2023 15:03:15 -0500 Subject: [PATCH 1/2] Update relative_directory.cpp --- clang/test/ClangScanDeps/relative_directory.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clang/test/ClangScanDeps/relative_directory.cpp b/clang/test/ClangScanDeps/relative_directory.cpp index bf5cf91a2f7b6be..495867467f6e114 100644 --- a/clang/test/ClangScanDeps/relative_directory.cpp +++ b/clang/test/ClangScanDeps/relative_directory.cpp @@ -1,3 +1,5 @@ +// UNSUPPORTED: target={{.*}}-aix{{.*}} + // RUN: rm -rf %t.dir // RUN: rm -rf %t.cdb // RUN: mkdir -p %t.dir >From 1ff89e84c1f2cbd6c53d3c6bc888e782f7f35bb9 Mon Sep 17 00:00:00 2001 From: Jake Egan <5326451+jakee...@users.noreply.github.com> Date: Tue, 14 Nov 2023 15:03:53 -0500 Subject: [PATCH 2/2] Update regular_cdb.cpp --- clang/test/ClangScanDeps/regular_cdb.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/clang/test/ClangScanDeps/regular_cdb.cpp b/clang/test/ClangScanDeps/regular_cdb.cpp index 2d7edc8c34d5a07..1972c6700d37f55 100644 --- a/clang/test/ClangScanDeps/regular_cdb.cpp +++ b/clang/test/ClangScanDeps/regular_cdb.cpp @@ -1,3 +1,5 @@ +// UNSUPPORTED: target={{.*}}-aix{{.*}} + // RUN: rm -rf %t.dir // RUN: rm -rf %t.cdb // RUN: rm -rf %t_clangcl.cdb ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[llvm] [clang] [AIX] Enable tests relating to 64-bit XCOFF object files (PR #71814)
https://github.com/jakeegan closed https://github.com/llvm/llvm-project/pull/71814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[llvm] [clang] [AIX] Enable tests relating to 64-bit XCOFF object files (PR #71814)
@@ -332,43 +332,6 @@ def calculate_arch_features(arch_string): config.available_features.add("llvm-driver") -def exclude_unsupported_files_for_aix(dirname): -for filename in os.listdir(dirname): -source_path = os.path.join(dirname, filename) -if os.path.isdir(source_path): -continue -f = open(source_path, "r", encoding="ISO-8859-1") -try: -data = f.read() -# 64-bit object files are not supported on AIX, so exclude the tests. -if ( -any( -option in data -for option in ( -"-emit-obj", -"-fmodule-format=obj", -"-fintegrated-as", -) -) -and "64" in config.target_triple -): -config.excludes += [filename] -finally: -f.close() - - -if "aix" in config.target_triple: -for directory in ( -"/CodeGenCXX", -"/Misc", -"/Modules", -"/PCH", -"/Driver", -"/ASTMerge/anonymous-fields", -"/ASTMerge/injected-class-name-decl", jakeegan wrote: There were no failures from running check-all. I also ran the tests in PCH/Modules individually and they pass. https://github.com/llvm/llvm-project/pull/71814 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[llvm] [clang] [AIX] Enable tests relating to 64-bit XCOFF object files (PR #71814)
https://github.com/jakeegan created https://github.com/llvm/llvm-project/pull/71814 We now have 64-bit XCOFF object file support, so these tests can be enabled again. However, some tests still fail due to unsupported debug sections, so I cleaned up their comments. >From 080887dca39dacdf482298b30137e494c0cbcb8b Mon Sep 17 00:00:00 2001 From: Jake Egan <5326451+jakee...@users.noreply.github.com> Date: Thu, 9 Nov 2023 10:05:10 -0500 Subject: [PATCH] [AIX] Enable tests relating to 64-bit XCOFF object files --- clang/test/lit.cfg.py | 37 - llvm/test/lit.cfg.py | 28 .../DebugInfo/DWARF/DWARFDebugInfoTest.cpp| 70 ++-- .../DebugInfo/DWARF/DWARFDebugLineTest.cpp| 155 ++ 4 files changed, 28 insertions(+), 262 deletions(-) diff --git a/clang/test/lit.cfg.py b/clang/test/lit.cfg.py index 60843ef8a142048..271372b928ac55c 100644 --- a/clang/test/lit.cfg.py +++ b/clang/test/lit.cfg.py @@ -332,43 +332,6 @@ def calculate_arch_features(arch_string): config.available_features.add("llvm-driver") -def exclude_unsupported_files_for_aix(dirname): -for filename in os.listdir(dirname): -source_path = os.path.join(dirname, filename) -if os.path.isdir(source_path): -continue -f = open(source_path, "r", encoding="ISO-8859-1") -try: -data = f.read() -# 64-bit object files are not supported on AIX, so exclude the tests. -if ( -any( -option in data -for option in ( -"-emit-obj", -"-fmodule-format=obj", -"-fintegrated-as", -) -) -and "64" in config.target_triple -): -config.excludes += [filename] -finally: -f.close() - - -if "aix" in config.target_triple: -for directory in ( -"/CodeGenCXX", -"/Misc", -"/Modules", -"/PCH", -"/Driver", -"/ASTMerge/anonymous-fields", -"/ASTMerge/injected-class-name-decl", -): -exclude_unsupported_files_for_aix(config.test_source_root + directory) - # Some tests perform deep recursion, which requires a larger pthread stack size # than the relatively low default of 192 KiB for 64-bit processes on AIX. The # `AIXTHREAD_STK` environment variable provides a non-intrusive way to request diff --git a/llvm/test/lit.cfg.py b/llvm/test/lit.cfg.py index 022d1aedbdcdbb6..f3b49a398e76062 100644 --- a/llvm/test/lit.cfg.py +++ b/llvm/test/lit.cfg.py @@ -601,34 +601,6 @@ def have_ld64_plugin_support(): config.available_features.add("use_msan_with_origins") -def exclude_unsupported_files_for_aix(dirname): -for filename in os.listdir(dirname): -source_path = os.path.join(dirname, filename) -if os.path.isdir(source_path): -continue -f = open(source_path, "r") -try: -data = f.read() -# 64-bit object files are not supported on AIX, so exclude the tests. -if ( -"-emit-obj" in data or "-filetype=obj" in data -) and "64" in config.target_triple: -config.excludes += [filename] -finally: -f.close() - - -if "aix" in config.target_triple: -for directory in ( -"/CodeGen/X86", -"/DebugInfo", -"/DebugInfo/X86", -"/DebugInfo/Generic", -"/LTO/X86", -"/Linker", -): -exclude_unsupported_files_for_aix(config.test_source_root + directory) - # Some tools support an environment variable "OBJECT_MODE" on AIX OS, which # controls the kind of objects they will support. If there is no "OBJECT_MODE" # environment variable specified, the default behaviour is to support 32-bit diff --git a/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp b/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp index d81557d756300c8..0b7f8f41bc53f43 100644 --- a/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp +++ b/llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp @@ -33,6 +33,12 @@ #include "gtest/gtest.h" #include +// AIX doesn't support debug_str_offsets or debug_addr sections +#ifdef _AIX +#define NO_SUPPORT_DEBUG_STR_OFFSETS +#define NO_SUPPORT_DEBUG_ADDR +#endif + using namespace llvm; using namespace dwarf; using namespace utils; @@ -435,11 +441,7 @@ TEST(DWARFDebugInfo, TestDWARF32Version2Addr4AllForms) { TestAllForms<2, AddrType, RefAddrType>(); } -#ifdef _AIX -TEST(DWARFDebugInfo, DISABLED_TestDWARF32Version2Addr8AllForms) { -#else TEST(DWARFDebugInfo, TestDWARF32Version2Addr8AllForms) { -#endif // Test that we can decode all forms for DWARF32, version 2, with 4 byte // addresses. typedef uint64_t AddrType; @@ -457,11 +459,7 @@ TEST(DWARFDebugInfo, TestDWARF32Version3Addr4AllForms) { TestAllForms<3,
[libunwind] 4fc7019 - [libc++][AIX] Add OS version to target triple
Author: Jake Egan Date: 2023-10-31T16:23:05-04:00 New Revision: 4fc70197919cded66502d1ad853f9e7f344b9a77 URL: https://github.com/llvm/llvm-project/commit/4fc70197919cded66502d1ad853f9e7f344b9a77 DIFF: https://github.com/llvm/llvm-project/commit/4fc70197919cded66502d1ad853f9e7f344b9a77.diff LOG: [libc++][AIX] Add OS version to target triple This will allow for configuring tests according to AIX version. Reviewed By: daltenty, #libc, Mordante Differential Revision: https://reviews.llvm.org/D149660 Added: Modified: libcxx/test/configs/ibm-libc++-shared.cfg.in libcxxabi/test/configs/ibm-libc++abi-shared.cfg.in libunwind/test/configs/ibm-libunwind-shared.cfg.in libunwind/test/signal_frame.pass.cpp llvm/utils/lit/lit/util.py Removed: diff --git a/libcxx/test/configs/ibm-libc++-shared.cfg.in b/libcxx/test/configs/ibm-libc++-shared.cfg.in index 7881556603cfa74..50061e9717ce063 100644 --- a/libcxx/test/configs/ibm-libc++-shared.cfg.in +++ b/libcxx/test/configs/ibm-libc++-shared.cfg.in @@ -4,6 +4,12 @@ lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg') +import lit.util +if lit.util.isAIXTriple(config.target_triple): + # Add the AIX version to the triple here because there currently isn't a good + # way to retrieve the AIX version in the driver. + config.target_triple = lit.util.addAIXVersion(config.target_triple) + config.substitutions.append(('%{flags}', '-pthread')) config.substitutions.append(('%{compile_flags}', '-nostdinc++ -D__LIBC_NO_CPP_MATH_OVERLOADS__ -I %{include} -I %{libcxx}/test/support' diff --git a/libcxxabi/test/configs/ibm-libc++abi-shared.cfg.in b/libcxxabi/test/configs/ibm-libc++abi-shared.cfg.in index 2a9bc9061566fa4..bd6c1fb135aaa92 100644 --- a/libcxxabi/test/configs/ibm-libc++abi-shared.cfg.in +++ b/libcxxabi/test/configs/ibm-libc++abi-shared.cfg.in @@ -2,6 +2,12 @@ lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg') +import lit.util +if lit.util.isAIXTriple(config.target_triple): + # Add the AIX version to the triple here because there currently isn't a good + # way to retrieve the AIX version in the driver. + config.target_triple = lit.util.addAIXVersion(config.target_triple) + config.substitutions.append(('%{flags}','')) config.substitutions.append(('%{compile_flags}', '-nostdinc++ -I %{include} -I %{cxx-include} -I %{cxx-target-include} %{maybe-include-libunwind} ' + diff --git a/libunwind/test/configs/ibm-libunwind-shared.cfg.in b/libunwind/test/configs/ibm-libunwind-shared.cfg.in index c38d278ad2c9cd4..2221e0cf499ff21 100644 --- a/libunwind/test/configs/ibm-libunwind-shared.cfg.in +++ b/libunwind/test/configs/ibm-libunwind-shared.cfg.in @@ -3,6 +3,12 @@ lit_config.load_config(config, '@CMAKE_CURRENT_BINARY_DIR@/cmake-bridge.cfg') +import lit.util +if lit.util.isAIXTriple(config.target_triple): + # Add the AIX version to the triple here because there currently isn't a good + # way to retrieve the AIX version in the driver. + config.target_triple = lit.util.addAIXVersion(config.target_triple) + config.substitutions.append(('%{flags}', '')) config.substitutions.append(('%{compile_flags}', '-nostdinc++ -I %{include}' diff --git a/libunwind/test/signal_frame.pass.cpp b/libunwind/test/signal_frame.pass.cpp index e5409f6ce3d9973..004029cfe1e90b2 100644 --- a/libunwind/test/signal_frame.pass.cpp +++ b/libunwind/test/signal_frame.pass.cpp @@ -19,7 +19,7 @@ // The AIX assembler does not support CFI directives, which // are necessary to run this test. -// UNSUPPORTED: target=powerpc{{(64)?}}-ibm-aix +// UNSUPPORTED: target={{.*}}-aix{{.*}} // Windows doesn't generally use CFI directives. However, i686 // mingw targets do use DWARF (where CFI directives are supported). diff --git a/llvm/utils/lit/lit/util.py b/llvm/utils/lit/lit/util.py index c8d7ec62a57458d..232ddc9171ad3d6 100644 --- a/llvm/utils/lit/lit/util.py +++ b/llvm/utils/lit/lit/util.py @@ -6,6 +6,7 @@ import numbers import os import platform +import re import signal import subprocess import sys @@ -429,6 +430,22 @@ def killProcess(): return out, err, exitCode +def isAIXTriple(target_triple): +"""Whether the given target triple is for AIX, +e.g. powerpc64-ibm-aix +""" +return "aix" in target_triple + + +def addAIXVersion(target_triple): +"""Add the AIX version to the given target triple, +e.g. powerpc64-ibm-aix7.2.5.6 +""" +os_cmd = "oslevel -s | awk -F\'-\' \'{printf \"%.1f.%d.%d\", $1/1000, $2, $3}\'" +os_version = subprocess.run(os_cmd, capture_output=True, shell=True).stdout.decode() +return re.sub("aix", "aix" + os_version, target_triple) + + def isMacOSTriple(target_triple): """Whether the given target triple is for macOS, e.g. x86_64-apple-darwin, arm64-apple-macos
[clang] [clang][Module] Mark test unsupported since objc doesn't have xcoff/g… (PR #70661)
https://github.com/jakeegan closed https://github.com/llvm/llvm-project/pull/70661 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] [clang][Module] Mark test unsupported since objc doesn't have xcoff/g… (PR #70661)
https://github.com/jakeegan created https://github.com/llvm/llvm-project/pull/70661 …off support Same as D135848. The newly added test fails with `fatal error: error in backend: Objective-C support is unimplemented for object file format`. >From 9392421ef48aadfbbc0fcfe387f15c9fc1705b0d Mon Sep 17 00:00:00 2001 From: Jake Egan <5326451+jakee...@users.noreply.github.com> Date: Mon, 30 Oct 2023 10:05:45 -0400 Subject: [PATCH] [clang][Module] Mark test unsupported since objc doesn't have xcoff/goff support --- clang/test/Modules/relative-resource-dir.m | 1 + 1 file changed, 1 insertion(+) diff --git a/clang/test/Modules/relative-resource-dir.m b/clang/test/Modules/relative-resource-dir.m index 2efc61259fd7891..e0d1b6d221d109a 100644 --- a/clang/test/Modules/relative-resource-dir.m +++ b/clang/test/Modules/relative-resource-dir.m @@ -1,3 +1,4 @@ +// UNSUPPORTED: -zos, -aix // REQUIRES: shell // RUN: EXPECTED_RESOURCE_DIR=`%clang -print-resource-dir` && \ ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] 86337be - [AIX][ClangRepl] Disable new tests on AIX
Author: Jake Egan Date: 2023-08-30T21:36:07-04:00 New Revision: 86337beca2e6f939127cd3e088ec80c0cf4a0a64 URL: https://github.com/llvm/llvm-project/commit/86337beca2e6f939127cd3e088ec80c0cf4a0a64 DIFF: https://github.com/llvm/llvm-project/commit/86337beca2e6f939127cd3e088ec80c0cf4a0a64.diff LOG: [AIX][ClangRepl] Disable new tests on AIX These newly added tests fail on AIX with error `LLVM ERROR: Incompatible object format!`. Disable them for now while we investigate. Reviewed By: capfredf, shchenz Differential Revision: https://reviews.llvm.org/D159213 Added: Modified: clang/unittests/Interpreter/CodeCompletionTest.cpp Removed: diff --git a/clang/unittests/Interpreter/CodeCompletionTest.cpp b/clang/unittests/Interpreter/CodeCompletionTest.cpp index d616afebc7d004..8f5f3545029d08 100644 --- a/clang/unittests/Interpreter/CodeCompletionTest.cpp +++ b/clang/unittests/Interpreter/CodeCompletionTest.cpp @@ -50,7 +50,11 @@ static std::vector runComp(clang::Interpreter , return Comps; } +#ifdef _AIX +TEST(CodeCompletionTest, DISABLED_Sanity) { +#else TEST(CodeCompletionTest, Sanity) { +#endif auto Interp = createInterpreter(); if (auto R = Interp->ParseAndExecute("int foo = 12;")) { consumeError(std::move(R)); @@ -63,7 +67,11 @@ TEST(CodeCompletionTest, Sanity) { EXPECT_EQ((bool)Err, false); } +#ifdef _AIX +TEST(CodeCompletionTest, DISABLED_SanityNoneValid) { +#else TEST(CodeCompletionTest, SanityNoneValid) { +#endif auto Interp = createInterpreter(); if (auto R = Interp->ParseAndExecute("int foo = 12;")) { consumeError(std::move(R)); @@ -75,7 +83,11 @@ TEST(CodeCompletionTest, SanityNoneValid) { EXPECT_EQ((bool)Err, false); } +#ifdef _AIX +TEST(CodeCompletionTest, DISABLED_TwoDecls) { +#else TEST(CodeCompletionTest, TwoDecls) { +#endif auto Interp = createInterpreter(); if (auto R = Interp->ParseAndExecute("int application = 12;")) { consumeError(std::move(R)); ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] bbd0d12 - Implement -frecord-command-line for XCOFF
Author: Jake Egan Date: 2023-07-10T12:47:07-04:00 New Revision: bbd0d123d3aaa67d8bed9d16d9001b33540fc04d URL: https://github.com/llvm/llvm-project/commit/bbd0d123d3aaa67d8bed9d16d9001b33540fc04d DIFF: https://github.com/llvm/llvm-project/commit/bbd0d123d3aaa67d8bed9d16d9001b33540fc04d.diff LOG: Implement -frecord-command-line for XCOFF This patch extends support of the option `-frecord-command-line` to XCOFF. XCOFF doesn’t have custom sections like ELF, so the command line data is emitted to a .info section instead. A C_INFO symbol is generated with the .info section to preserve the command line data past the link step. Multiple command lines are separated by newlines and null bytes. The command line data can be retrieved on AIX with command `what file_name`. Reviewed By: scott.linder Differential Revision: https://reviews.llvm.org/D153600 Added: llvm/test/CodeGen/PowerPC/aix-command-line-metadata.ll Modified: clang/lib/Driver/ToolChains/Clang.cpp llvm/include/llvm/CodeGen/AsmPrinter.h llvm/include/llvm/MC/MCStreamer.h llvm/include/llvm/MC/MCXCOFFStreamer.h llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp llvm/lib/MC/MCAsmStreamer.cpp llvm/lib/MC/MCStreamer.cpp llvm/lib/Target/PowerPC/PPCAsmPrinter.cpp Removed: diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp index efdb7889bc838b..a9efab7ae07816 100644 --- a/clang/lib/Driver/ToolChains/Clang.cpp +++ b/clang/lib/Driver/ToolChains/Clang.cpp @@ -7153,7 +7153,8 @@ void Clang::ConstructJob(Compilation , const JobAction , auto FRecordSwitches = Args.hasFlag(options::OPT_frecord_command_line, options::OPT_fno_record_command_line, false); - if (FRecordSwitches && !Triple.isOSBinFormatELF()) + if (FRecordSwitches && !Triple.isOSBinFormatELF() && + !Triple.isOSBinFormatXCOFF()) D.Diag(diag::err_drv_unsupported_opt_for_target) << Args.getLastArg(options::OPT_frecord_command_line)->getAsString(Args) << TripleStr; diff --git a/llvm/include/llvm/CodeGen/AsmPrinter.h b/llvm/include/llvm/CodeGen/AsmPrinter.h index 8d2684698233a4..0ac497c5f8efbd 100644 --- a/llvm/include/llvm/CodeGen/AsmPrinter.h +++ b/llvm/include/llvm/CodeGen/AsmPrinter.h @@ -866,7 +866,7 @@ class AsmPrinter : public MachineFunctionPass { /// Emit llvm.ident metadata in an '.ident' directive. void emitModuleIdents(Module ); /// Emit bytes for llvm.commandline metadata. - void emitModuleCommandLines(Module ); + virtual void emitModuleCommandLines(Module ); GCMetadataPrinter *getOrCreateGCPrinter(GCStrategy ); void emitGlobalAlias(Module , const GlobalAlias ); diff --git a/llvm/include/llvm/MC/MCStreamer.h b/llvm/include/llvm/MC/MCStreamer.h index 5f12fcc1c840b7..dcd84a6efda0e8 100644 --- a/llvm/include/llvm/MC/MCStreamer.h +++ b/llvm/include/llvm/MC/MCStreamer.h @@ -647,6 +647,12 @@ class MCStreamer { /// \param Sym - The symbol on the .ref directive. virtual void emitXCOFFRefDirective(const MCSymbol *Symbol); + /// Emit a C_INFO symbol with XCOFF embedded metadata to the .info section. + /// + /// \param Name - The embedded metadata name + /// \param Metadata - The embedded metadata + virtual void emitXCOFFCInfoSym(StringRef Name, StringRef Metadata); + /// Emit an ELF .size directive. /// /// This corresponds to an assembler statement such as: diff --git a/llvm/include/llvm/MC/MCXCOFFStreamer.h b/llvm/include/llvm/MC/MCXCOFFStreamer.h index aea2a3265d572c..a3db636e5b3a93 100644 --- a/llvm/include/llvm/MC/MCXCOFFStreamer.h +++ b/llvm/include/llvm/MC/MCXCOFFStreamer.h @@ -40,6 +40,10 @@ class MCXCOFFStreamer : public MCObjectStreamer { void emitXCOFFExceptDirective(const MCSymbol *Symbol, const MCSymbol *Trap, unsigned Lang, unsigned Reason, unsigned FunctionSize, bool hasDebug) override; + void emitXCOFFCInfoSym(StringRef Name, StringRef Metadata) override { +report_fatal_error("emitXCOFFCInfoSym is not implemented yet on " + "object generation path"); + } }; } // end namespace llvm diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp index b1e41c573a87f9..79a4e168e7e795 100644 --- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinter.cpp @@ -486,6 +486,11 @@ bool AsmPrinter::doInitialization(Module ) { } } + // On AIX, emit bytes for llvm.commandline metadata after .file so that the + // C_INFO symbol is preserved if any csect is kept by the linker. + if (TM.getTargetTriple().isOSBinFormatXCOFF()) +emitModuleCommandLines(M); + GCModuleInfo *MI = getAnalysisIfAvailable(); assert(MI && "AsmPrinter didn't require GCModuleInfo?"); for (const auto : *MI) @@ -2330,7 +2335,9 @@ bool
[clang] 985dace - [AIX][tests] Temporarily disable test index-with-module.m
Author: Jake Egan Date: 2023-06-16T01:24:19-04:00 New Revision: 985daceac9cbe4d08a3f018fec47cfc371a9f60b URL: https://github.com/llvm/llvm-project/commit/985daceac9cbe4d08a3f018fec47cfc371a9f60b DIFF: https://github.com/llvm/llvm-project/commit/985daceac9cbe4d08a3f018fec47cfc371a9f60b.diff LOG: [AIX][tests] Temporarily disable test index-with-module.m This test is failing on AIX due to patch D151938. Disable it for now to get the bot green while we investigate. Added: Modified: clang/test/Index/Core/index-with-module.m Removed: diff --git a/clang/test/Index/Core/index-with-module.m b/clang/test/Index/Core/index-with-module.m index b116768fdb557..5258e64c1941e 100644 --- a/clang/test/Index/Core/index-with-module.m +++ b/clang/test/Index/Core/index-with-module.m @@ -1,3 +1,4 @@ +// XFAIL: target={{.*}}-aix{{.*}} // RUN: rm -rf %t.mcp // RUN: c-index-test core -print-source-symbols -dump-imported-module-files -- %s -I %S/Inputs/module -fmodules -fmodules-cache-path=%t.mcp | FileCheck %s ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] 8097d01 - Revert "[AIX][tests] XFAIL -ftime-trace test for now"
Author: Jake Egan Date: 2023-05-15T13:50:21-04:00 New Revision: 8097d01260fc251c613e848607db1d7dbddaa22c URL: https://github.com/llvm/llvm-project/commit/8097d01260fc251c613e848607db1d7dbddaa22c DIFF: https://github.com/llvm/llvm-project/commit/8097d01260fc251c613e848607db1d7dbddaa22c.diff LOG: Revert "[AIX][tests] XFAIL -ftime-trace test for now" The test was fixed by 2f999327534f7cc660d2747ce294f50184dc1f97. This reverts commit 25dc215ddaa6cb3e206858008fe4bc6844ea0d9c. Added: Modified: clang/test/Driver/ftime-trace.cpp Removed: diff --git a/clang/test/Driver/ftime-trace.cpp b/clang/test/Driver/ftime-trace.cpp index 12f845035fe3..5fe63de915a7 100644 --- a/clang/test/Driver/ftime-trace.cpp +++ b/clang/test/Driver/ftime-trace.cpp @@ -1,6 +1,3 @@ -// Failing on AIX due to D150282 -// XFAIL: target={{.*}}-aix{{.*}} - // RUN: rm -rf %t && mkdir -p %t && cd %t // RUN: %clangxx -S -no-canonical-prefixes -ftime-trace -ftime-trace-granularity=0 -o out %s // RUN: cat out.json \ ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] 25dc215 - [AIX][tests] XFAIL -ftime-trace test for now
Author: Jake Egan Date: 2023-05-15T01:41:27-04:00 New Revision: 25dc215ddaa6cb3e206858008fe4bc6844ea0d9c URL: https://github.com/llvm/llvm-project/commit/25dc215ddaa6cb3e206858008fe4bc6844ea0d9c DIFF: https://github.com/llvm/llvm-project/commit/25dc215ddaa6cb3e206858008fe4bc6844ea0d9c.diff LOG: [AIX][tests] XFAIL -ftime-trace test for now This test is failing due to D150282. XFAIL this test for now while it's being investigated to get the AIX bot green. Added: Modified: clang/test/Driver/ftime-trace.cpp Removed: diff --git a/clang/test/Driver/ftime-trace.cpp b/clang/test/Driver/ftime-trace.cpp index d1c9a0fee76f1..ee577a85a79be 100644 --- a/clang/test/Driver/ftime-trace.cpp +++ b/clang/test/Driver/ftime-trace.cpp @@ -1,3 +1,6 @@ +// Failing on AIX due to D150282 +// XFAIL: target={{.*}}-aix{{.*}} + // RUN: rm -rf %t && mkdir -p %t && cd %t // RUN: %clangxx -S -no-canonical-prefixes -ftime-trace -ftime-trace-granularity=0 -o out %s // RUN: cat out.json \ ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] 3442aba - [NFC][tests] Disable new gmodules-preferred-name-* tests on AIX and z/OS
Author: Jake Egan Date: 2023-04-10T09:51:02-04:00 New Revision: 3442aba806b98ffe2d6afbbc629d8a6a3731a5f5 URL: https://github.com/llvm/llvm-project/commit/3442aba806b98ffe2d6afbbc629d8a6a3731a5f5 DIFF: https://github.com/llvm/llvm-project/commit/3442aba806b98ffe2d6afbbc629d8a6a3731a5f5.diff LOG: [NFC][tests] Disable new gmodules-preferred-name-* tests on AIX and z/OS Objective-C is not supported on AIX and z/OS. Precedent here: D109060 Added: Modified: clang/test/Modules/gmodules-preferred-name-alias.cpp clang/test/Modules/gmodules-preferred-name-typedef.cpp Removed: diff --git a/clang/test/Modules/gmodules-preferred-name-alias.cpp b/clang/test/Modules/gmodules-preferred-name-alias.cpp index 687125c86e9fb..d01cefb83d151 100644 --- a/clang/test/Modules/gmodules-preferred-name-alias.cpp +++ b/clang/test/Modules/gmodules-preferred-name-alias.cpp @@ -1,3 +1,5 @@ +// UNSUPPORTED: target={{.*}}-zos{{.*}}, target={{.*}}-aix{{.*}} + // REQUIRES: asserts // RUN: rm -rf %t // RUN: %clang_cc1 -std=c++11 -dwarf-ext-refs -fmodule-format=obj \ diff --git a/clang/test/Modules/gmodules-preferred-name-typedef.cpp b/clang/test/Modules/gmodules-preferred-name-typedef.cpp index e6a8f3ef4c68e..1d2bbd75fe866 100644 --- a/clang/test/Modules/gmodules-preferred-name-typedef.cpp +++ b/clang/test/Modules/gmodules-preferred-name-typedef.cpp @@ -1,3 +1,5 @@ +// UNSUPPORTED: target={{.*}}-zos{{.*}}, target={{.*}}-aix{{.*}} + // REQUIRES: asserts // RUN: rm -rf %t // RUN: %clang_cc1 -std=c++11 -dwarf-ext-refs -fmodule-format=obj \ ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] 748a820 - [NFC] Disable test temporarily to investigate why it's failing on AIX
Author: Jake Egan Date: 2023-03-06T09:27:54-05:00 New Revision: 748a820d97dd6aecce9fc1416182dd22258cc489 URL: https://github.com/llvm/llvm-project/commit/748a820d97dd6aecce9fc1416182dd22258cc489 DIFF: https://github.com/llvm/llvm-project/commit/748a820d97dd6aecce9fc1416182dd22258cc489.diff LOG: [NFC] Disable test temporarily to investigate why it's failing on AIX Test failing due to D145098. Disabling the test to get the AIX bot green while investigating. Added: Modified: clang/test/ClangScanDeps/modules-full-output-tu-order.c Removed: diff --git a/clang/test/ClangScanDeps/modules-full-output-tu-order.c b/clang/test/ClangScanDeps/modules-full-output-tu-order.c index eb96d2e99c62..e676a2931d63 100644 --- a/clang/test/ClangScanDeps/modules-full-output-tu-order.c +++ b/clang/test/ClangScanDeps/modules-full-output-tu-order.c @@ -1,3 +1,6 @@ +// Disable the test temporarily to investigate why it's failing on AIX. +// XFAIL: target={{.*}}-aix{{.*}} + // This test checks that ordering of TUs in the input CDB is preserved in the full output. // RUN: rm -rf %t ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] a7b47fa - [NFC] Disable test on AIX due to different default output
Author: Jake Egan Date: 2023-01-18T01:14:47-05:00 New Revision: a7b47fa17c37485a1658ce44e0d87edf69e4b8be URL: https://github.com/llvm/llvm-project/commit/a7b47fa17c37485a1658ce44e0d87edf69e4b8be DIFF: https://github.com/llvm/llvm-project/commit/a7b47fa17c37485a1658ce44e0d87edf69e4b8be.diff LOG: [NFC] Disable test on AIX due to different default output Previous attempt to stop this test from running on AIX didn't work, so revert it and require not system-aix instead. This reverts commit b1ac375e11c801be2a1e07e87be91ae54decf2eb. Added: Modified: clang/test/Driver/module-output.cppm Removed: diff --git a/clang/test/Driver/module-output.cppm b/clang/test/Driver/module-output.cppm index a01531b889a3..b3505ef44194 100644 --- a/clang/test/Driver/module-output.cppm +++ b/clang/test/Driver/module-output.cppm @@ -2,7 +2,9 @@ // in Windows and Linux. So we disable the test on Windows // here. // REQUIRES: !system-windows -// REQUIRES: x86-registered-target +// On AIX, the default output for `-c` may be `.s` instead of `.o`, +// which makes the test fail. So disable the test on AIX. +// REQUIRES: !system-aix // // RUN: rm -rf %t // RUN: mkdir %t ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] 824874c - [AIX][NFC] Unsupport test when running on AIX
Author: Jake Egan Date: 2023-01-12T13:21:59-05:00 New Revision: 824874c8d43383f0e6bdeb8a914c95fb916ecd9d URL: https://github.com/llvm/llvm-project/commit/824874c8d43383f0e6bdeb8a914c95fb916ecd9d DIFF: https://github.com/llvm/llvm-project/commit/824874c8d43383f0e6bdeb8a914c95fb916ecd9d.diff LOG: [AIX][NFC] Unsupport test when running on AIX Previously the test's targets were restricted to avoid the AIX target, but it should be marked unsupported for system-aix instead because the test fails to run on AIX as well. Added: Modified: clang/test/CodeGenCXX/pr59765-modules-global-ctor-dtor.cppm Removed: diff --git a/clang/test/CodeGenCXX/pr59765-modules-global-ctor-dtor.cppm b/clang/test/CodeGenCXX/pr59765-modules-global-ctor-dtor.cppm index daa3a65dc393..1a9384bf0bc9 100644 --- a/clang/test/CodeGenCXX/pr59765-modules-global-ctor-dtor.cppm +++ b/clang/test/CodeGenCXX/pr59765-modules-global-ctor-dtor.cppm @@ -1,12 +1,9 @@ // https://github.com/llvm/llvm-project/issues/59765 -// FIXME: Disable the test for now to figure out why the -// test is still being run on AIX despite the REQUIRES. -// XFAIL: target={{.*}}-aix{{.*}} // FIXME: Since the signature of the constructors/destructors is // diff erent in diff erent targets. The current CHECK can't work -// well for other targets like AIX. So here is the REQUIRES. +// well when targeting or running on AIX. // It would be better to add the corresponding test for other test. -// REQUIRES: x86-registered-target,aarch64-registered-target +// UNSUPPORTED: system-aix // // RUN: rm -rf %t // RUN: mkdir %t ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] 07aaae1 - [NFC][AIX] Temporarily XFAIL test while investigating
Author: Jake Egan Date: 2023-01-10T19:53:44-05:00 New Revision: 07aaae13037dadcbf3988fb503c83fd90a3310b1 URL: https://github.com/llvm/llvm-project/commit/07aaae13037dadcbf3988fb503c83fd90a3310b1 DIFF: https://github.com/llvm/llvm-project/commit/07aaae13037dadcbf3988fb503c83fd90a3310b1.diff LOG: [NFC][AIX] Temporarily XFAIL test while investigating Previous attempt to restrict this test to x86 and aarch64 targets only didn't work. So XFAIL this test while investigating to get the AIX bot back to green. Added: Modified: clang/test/CodeGenCXX/pr59765-modules-global-ctor-dtor.cppm Removed: diff --git a/clang/test/CodeGenCXX/pr59765-modules-global-ctor-dtor.cppm b/clang/test/CodeGenCXX/pr59765-modules-global-ctor-dtor.cppm index 64d0b606c6f4f..daa3a65dc393c 100644 --- a/clang/test/CodeGenCXX/pr59765-modules-global-ctor-dtor.cppm +++ b/clang/test/CodeGenCXX/pr59765-modules-global-ctor-dtor.cppm @@ -1,5 +1,7 @@ // https://github.com/llvm/llvm-project/issues/59765 -// +// FIXME: Disable the test for now to figure out why the +// test is still being run on AIX despite the REQUIRES. +// XFAIL: target={{.*}}-aix{{.*}} // FIXME: Since the signature of the constructors/destructors is // diff erent in diff erent targets. The current CHECK can't work // well for other targets like AIX. So here is the REQUIRES. ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] bd519b9 - redo UNSUPPORT test on 64-bit AIX too
Author: Jake Egan Date: 2022-07-20T10:18:28-04:00 New Revision: bd519b9335fe507bc2d2ebbbd3321ba046f038a3 URL: https://github.com/llvm/llvm-project/commit/bd519b9335fe507bc2d2ebbbd3321ba046f038a3 DIFF: https://github.com/llvm/llvm-project/commit/bd519b9335fe507bc2d2ebbbd3321ba046f038a3.diff LOG: redo UNSUPPORT test on 64-bit AIX too The test failure affects both bitmodes. Added: Modified: clang/test/Driver/experimental-library-flag.cpp Removed: diff --git a/clang/test/Driver/experimental-library-flag.cpp b/clang/test/Driver/experimental-library-flag.cpp index 2738df8473d8..529888b867c1 100644 --- a/clang/test/Driver/experimental-library-flag.cpp +++ b/clang/test/Driver/experimental-library-flag.cpp @@ -3,7 +3,7 @@ // XFAIL: windows, x86_64-scei-ps4, x86_64-sie-ps5 // For some reason, this fails with a core dump on AIX. This needs to be investigated. -// UNSUPPORTED: powerpc{{.*}}-ibm-aix +// UNSUPPORTED: aix // RUN: %clangxx -fexperimental-library -stdlib=libc++ -### %s 2>&1 | FileCheck --check-prefixes=CHECK,CHECK-LIBCXX %s // RUN: %clangxx -fexperimental-library -stdlib=libstdc++ -### %s 2>&1 | FileCheck --check-prefixes=CHECK,CHECK-LIBSTDCXX %s ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] 7373497 - UNSUPPORT test on 64-bit AIX too
Author: Jake Egan Date: 2022-07-20T10:05:03-04:00 New Revision: 7373497a4b282e30b07d72fa601265a631f4c5c5 URL: https://github.com/llvm/llvm-project/commit/7373497a4b282e30b07d72fa601265a631f4c5c5 DIFF: https://github.com/llvm/llvm-project/commit/7373497a4b282e30b07d72fa601265a631f4c5c5.diff LOG: UNSUPPORT test on 64-bit AIX too The test failure affects both bitmodes. Added: Modified: clang/test/Driver/experimental-library-flag.cpp Removed: diff --git a/clang/test/Driver/experimental-library-flag.cpp b/clang/test/Driver/experimental-library-flag.cpp index db661c026d06..2738df8473d8 100644 --- a/clang/test/Driver/experimental-library-flag.cpp +++ b/clang/test/Driver/experimental-library-flag.cpp @@ -3,7 +3,7 @@ // XFAIL: windows, x86_64-scei-ps4, x86_64-sie-ps5 // For some reason, this fails with a core dump on AIX. This needs to be investigated. -// UNSUPPORTED: powerpc-ibm-aix +// UNSUPPORTED: powerpc{{.*}}-ibm-aix // RUN: %clangxx -fexperimental-library -stdlib=libc++ -### %s 2>&1 | FileCheck --check-prefixes=CHECK,CHECK-LIBCXX %s // RUN: %clangxx -fexperimental-library -stdlib=libstdc++ -### %s 2>&1 | FileCheck --check-prefixes=CHECK,CHECK-LIBSTDCXX %s ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] c3c75d8 - [clang][test] Mark test arm-float-abi-lto.c unsupported on AIX
Author: Jake Egan Date: 2022-06-03T21:04:56-04:00 New Revision: c3c75d805c2174388417080f762230961b3433d6 URL: https://github.com/llvm/llvm-project/commit/c3c75d805c2174388417080f762230961b3433d6 DIFF: https://github.com/llvm/llvm-project/commit/c3c75d805c2174388417080f762230961b3433d6.diff LOG: [clang][test] Mark test arm-float-abi-lto.c unsupported on AIX This test is failing after the introduction of opaque pointers (https://reviews.llvm.org/D125847). The test is flaky and fails from segmentation fault, but it's unclear why. So, mark this test unsupported while it's investigated. Added: Modified: clang/test/Driver/arm-float-abi-lto.c Removed: diff --git a/clang/test/Driver/arm-float-abi-lto.c b/clang/test/Driver/arm-float-abi-lto.c index 8b6d8ff6b5d7a..bde61ce16441b 100644 --- a/clang/test/Driver/arm-float-abi-lto.c +++ b/clang/test/Driver/arm-float-abi-lto.c @@ -1,3 +1,5 @@ +// FIXME: Produces a segmentation fault on AIX after the introduction of opaque pointers (D125847). +// UNSUPPORTED: system-aix // REQUIRES: arm-registered-target // RUN: %clang --target=arm-none-eabi -mcpu=cortex-m33 -mfloat-abi=hard -O1 %s -S -o - -emit-llvm -DCALL_LIB -DDEFINE_LIB | FileCheck %s ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] be3fc66 - Revert "[clang][test] mark tests added in ee8524087c78 as unsupported on AIX"
Author: Jake Egan Date: 2022-05-30T09:35:26-04:00 New Revision: be3fc66f83b08a03ef3bc849ca3b37ff11e09199 URL: https://github.com/llvm/llvm-project/commit/be3fc66f83b08a03ef3bc849ca3b37ff11e09199 DIFF: https://github.com/llvm/llvm-project/commit/be3fc66f83b08a03ef3bc849ca3b37ff11e09199.diff LOG: Revert "[clang][test] mark tests added in ee8524087c78 as unsupported on AIX" The tests pass now on a clean build. This reverts commit 1b34f1e996565bc5e4f2be14b89f881f8fe0f3b9. Added: Modified: clang/test/Index/index-concept-kind.cpp clang/test/Index/index-concepts.cpp Removed: diff --git a/clang/test/Index/index-concept-kind.cpp b/clang/test/Index/index-concept-kind.cpp index f33fc6bc5cc0d..7aaf814f5f989 100644 --- a/clang/test/Index/index-concept-kind.cpp +++ b/clang/test/Index/index-concept-kind.cpp @@ -1,5 +1,5 @@ // RUN: c-index-test -index-file %s -std=gnu++20 | FileCheck %s -// UNSUPPORTED: aix + template concept LargeType = sizeof(T) > 8; // CHECK: [indexDeclaration]: kind: concept | name: LargeType | USR: c:@CT@LargeType | lang: C | cursor: ConceptDecl=LargeType:[[@LINE-1]]:9 (Definition) | loc: [[@LINE-1]]:9 | semantic-container: [TU] | lexical-container: [TU] | isRedecl: 0 | isDef: 1 | isContainer: 0 | isImplicit: 0 diff --git a/clang/test/Index/index-concepts.cpp b/clang/test/Index/index-concepts.cpp index b8d41e841e619..d29b9dcf79522 100644 --- a/clang/test/Index/index-concepts.cpp +++ b/clang/test/Index/index-concepts.cpp @@ -1,5 +1,5 @@ // RUN: c-index-test -test-load-source all %s -std=gnu++20 -fno-delayed-template-parsing | FileCheck %s -// UNSUPPORTED: aix + template struct type_trait { const static bool value = false; ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] f5a9b5c - [NFC][tests][AIX] XFAIL test for lack of visibility support
Author: Jake Egan Date: 2022-03-28T09:43:48-04:00 New Revision: f5a9b5cc12658f4d6caa3e0cfc3e771698fb3798 URL: https://github.com/llvm/llvm-project/commit/f5a9b5cc12658f4d6caa3e0cfc3e771698fb3798 DIFF: https://github.com/llvm/llvm-project/commit/f5a9b5cc12658f4d6caa3e0cfc3e771698fb3798.diff LOG: [NFC][tests][AIX] XFAIL test for lack of visibility support With the addition of `__attribute__((visibility("hidden")))` to the test, the test fails because AIX's current default behaviour is to ignore hidden visibility, so the expected error is not seen. This patch marks the test `XFAIL` on AIX for now. Reviewed By: cebowleratibm Differential Revision: https://reviews.llvm.org/D122519 Added: Modified: clang/test/OpenMP/target_update_messages.cpp Removed: diff --git a/clang/test/OpenMP/target_update_messages.cpp b/clang/test/OpenMP/target_update_messages.cpp index f936a075e1b48..d79b579430657 100644 --- a/clang/test/OpenMP/target_update_messages.cpp +++ b/clang/test/OpenMP/target_update_messages.cpp @@ -1,3 +1,6 @@ +// Visibility hidden is not currently implemented on AIX. +// XFAIL: aix + // RUN: %clang_cc1 -verify=expected,lt50,lt51 -fopenmp -fopenmp-version=45 -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized // RUN: %clang_cc1 -verify=expected,ge50,lt51 -fopenmp -fopenmp-version=50 -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized // RUN: %clang_cc1 -verify=expected,ge50,ge51 -fopenmp -fopenmp-version=51 -ferror-limit 100 -o - -std=c++11 %s -Wuninitialized ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] d1873d3 - [NFC][AIX] Disable precompiled module file test on AIX
Author: Jake Egan Date: 2022-03-15T15:16:15-04:00 New Revision: d1873d395d5799fe7344d08de7f2b01e53697eca URL: https://github.com/llvm/llvm-project/commit/d1873d395d5799fe7344d08de7f2b01e53697eca DIFF: https://github.com/llvm/llvm-project/commit/d1873d395d5799fe7344d08de7f2b01e53697eca.diff LOG: [NFC][AIX] Disable precompiled module file test on AIX This patch follows the same reasoning as D114481. The PCH reader looks for `__clangast` section in the precompiled module file, which is not present in the file on AIX and not supported in XCOFF yet. Reviewed By: daltenty Differential Revision: https://reviews.llvm.org/D121709 Added: Modified: clang/test/ClangScanDeps/modules-no-undeclared-includes.c Removed: diff --git a/clang/test/ClangScanDeps/modules-no-undeclared-includes.c b/clang/test/ClangScanDeps/modules-no-undeclared-includes.c index 72f39223cffc1..d88b32b6506be 100644 --- a/clang/test/ClangScanDeps/modules-no-undeclared-includes.c +++ b/clang/test/ClangScanDeps/modules-no-undeclared-includes.c @@ -1,3 +1,7 @@ +// Unsupported on AIX because we don't support the requisite "__clangast" +// section in XCOFF yet. +// UNSUPPORTED: aix + // RUN: rm -rf %t && mkdir %t // RUN: split-file %s %t ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] 6f4f745 - [clang][deps] Adapt test to be compatible when the assembler is called by default
Author: Jake Egan Date: 2022-01-28T11:40:16-05:00 New Revision: 6f4f745668eccf460ec1e0d34df4692f8e883b07 URL: https://github.com/llvm/llvm-project/commit/6f4f745668eccf460ec1e0d34df4692f8e883b07 DIFF: https://github.com/llvm/llvm-project/commit/6f4f745668eccf460ec1e0d34df4692f8e883b07.diff LOG: [clang][deps] Adapt test to be compatible when the assembler is called by default When `-fno-integrated-as` is in effect (the default on AIX) the cc1 job produces a `.s` file instead. This patch adapts the test to accept `.s` or `.o` files. Reviewed By: jansvoboda11 Differential Revision: https://reviews.llvm.org/D118152 Added: Modified: clang/test/ClangScanDeps/headerwithdirname.cpp clang/test/ClangScanDeps/headerwithdirnamefollowedbyinclude.cpp Removed: diff --git a/clang/test/ClangScanDeps/headerwithdirname.cpp b/clang/test/ClangScanDeps/headerwithdirname.cpp index b6c7f796e90e0..02b03926c553a 100644 --- a/clang/test/ClangScanDeps/headerwithdirname.cpp +++ b/clang/test/ClangScanDeps/headerwithdirname.cpp @@ -13,7 +13,7 @@ #include -// CHECK: headerwithdirname_input.o +// CHECK: headerwithdirname_input{{\.o|.*\.s}} // CHECK-NEXT: headerwithdirname_input.cpp // CHECK-NEXT: Inputs{{/|\\}}foodir diff --git a/clang/test/ClangScanDeps/headerwithdirnamefollowedbyinclude.cpp b/clang/test/ClangScanDeps/headerwithdirnamefollowedbyinclude.cpp index 1f9133dc74e8f..f67b12787bd77 100644 --- a/clang/test/ClangScanDeps/headerwithdirnamefollowedbyinclude.cpp +++ b/clang/test/ClangScanDeps/headerwithdirnamefollowedbyinclude.cpp @@ -17,7 +17,7 @@ #include #include "foodir/foodirheader.h" -// CHECK: headerwithdirname_input.o +// CHECK: headerwithdirname_input{{\.o|.*\.s}} // CHECK-NEXT: headerwithdirname_input.cpp // CHECK-NEXT: Inputs{{/|\\}}foodir ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] f24fe96 - [ifs] Use a tmp file instead of "-"
Author: Jake Egan Date: 2022-01-21T11:19:37-05:00 New Revision: f24fe96f469b8ccdb8504f998d1107d79c8fd363 URL: https://github.com/llvm/llvm-project/commit/f24fe96f469b8ccdb8504f998d1107d79c8fd363 DIFF: https://github.com/llvm/llvm-project/commit/f24fe96f469b8ccdb8504f998d1107d79c8fd363.diff LOG: [ifs] Use a tmp file instead of "-" Currently, Clang on AIX uses the system assembler to generate object files from assembly. The use of `-o -` results in a file named `-` instead of output to stdout. This patch uses a temporary object file instead. Reviewed By: DiggerLin, hubert.reinterpretcast Differential Revision: https://reviews.llvm.org/D117587 Added: Modified: clang/test/InterfaceStubs/object.c Removed: diff --git a/clang/test/InterfaceStubs/object.c b/clang/test/InterfaceStubs/object.c index 45e2d38ba3e9c..a7609ff40af72 100644 --- a/clang/test/InterfaceStubs/object.c +++ b/clang/test/InterfaceStubs/object.c @@ -1,5 +1,6 @@ // RUN: %clang_cc1 -fvisibility default -o - -emit-interface-stubs %s | FileCheck -check-prefix=CHECK-TAPI %s -// RUN: %clang -fvisibility=default -c -o - %s | llvm-nm - 2>&1 | FileCheck -check-prefix=CHECK-SYMBOLS %s +// RUN: %clang -fvisibility=default -c -o %t.o %s +// RUN: llvm-nm %t.o 2>&1 | FileCheck -check-prefix=CHECK-SYMBOLS %s // CHECK-TAPI: data", Type: Object, Size: 4 } // CHECK-SYMBOLS: data ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] 6f09775 - [AIX][ZOS] Handle unsupported builtin function CFStringMakeConstantString
Author: Jake Egan Date: 2022-01-17T11:24:16-05:00 New Revision: 6f0977519d12fc337e8bacd31dbaf84923e49b57 URL: https://github.com/llvm/llvm-project/commit/6f0977519d12fc337e8bacd31dbaf84923e49b57 DIFF: https://github.com/llvm/llvm-project/commit/6f0977519d12fc337e8bacd31dbaf84923e49b57.diff LOG: [AIX][ZOS] Handle unsupported builtin function CFStringMakeConstantString This patch emits an error on AIX and z/OS because XCOFF and GOFF does not currently implement builtin function `CFStringMakeConstantString`. Tests that use this builtin were also disabled. Reviewed By: SeanP Differential Revision: https://reviews.llvm.org/D117315 Added: Modified: clang/lib/Sema/SemaChecking.cpp clang/test/Analysis/cfref_PR2519.c clang/test/CodeGen/cfstring2.c clang/test/Modules/builtins.m clang/test/SemaCXX/builtins.cpp Removed: diff --git a/clang/lib/Sema/SemaChecking.cpp b/clang/lib/Sema/SemaChecking.cpp index a17ede85d3eb6..27653464110aa 100644 --- a/clang/lib/Sema/SemaChecking.cpp +++ b/clang/lib/Sema/SemaChecking.cpp @@ -1578,11 +1578,26 @@ static ExprResult SemaBuiltinLaunder(Sema , CallExpr *TheCall) { return TheCall; } +// Emit an error and return true if the current object format type is in the +// list of unsupported types. +static bool CheckBuiltinTargetNotInUnsupported( +Sema , unsigned BuiltinID, CallExpr *TheCall, +ArrayRef UnsupportedObjectFormatTypes) { + llvm::Triple::ObjectFormatType CurObjFormat = + S.getASTContext().getTargetInfo().getTriple().getObjectFormat(); + if (llvm::is_contained(UnsupportedObjectFormatTypes, CurObjFormat)) { +S.Diag(TheCall->getBeginLoc(), diag::err_builtin_target_unsupported) +<< TheCall->getSourceRange(); +return true; + } + return false; +} + // Emit an error and return true if the current architecture is not in the list // of supported architectures. static bool -CheckBuiltinTargetSupport(Sema , unsigned BuiltinID, CallExpr *TheCall, - ArrayRef SupportedArchs) { +CheckBuiltinTargetInSupported(Sema , unsigned BuiltinID, CallExpr *TheCall, + ArrayRef SupportedArchs) { llvm::Triple::ArchType CurArch = S.getASTContext().getTargetInfo().getTriple().getArch(); if (llvm::is_contained(SupportedArchs, CurArch)) @@ -1664,6 +1679,12 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID, switch (BuiltinID) { case Builtin::BI__builtin___CFStringMakeConstantString: +// CFStringMakeConstantString is currently not implemented for GOFF (i.e., +// on z/OS) and for XCOFF (i.e., on AIX). Emit unsupported +if (CheckBuiltinTargetNotInUnsupported( +*this, BuiltinID, TheCall, +{llvm::Triple::GOFF, llvm::Triple::XCOFF})) + return ExprError(); assert(TheCall->getNumArgs() == 1 && "Wrong # arguments to builtin CFStringMakeConstantString"); if (CheckObjCString(TheCall->getArg(0))) @@ -1698,7 +1719,7 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID, case Builtin::BI_interlockedbittestandreset_acq: case Builtin::BI_interlockedbittestandreset_rel: case Builtin::BI_interlockedbittestandreset_nf: -if (CheckBuiltinTargetSupport( +if (CheckBuiltinTargetInSupported( *this, BuiltinID, TheCall, {llvm::Triple::arm, llvm::Triple::thumb, llvm::Triple::aarch64})) return ExprError(); @@ -1711,9 +1732,10 @@ Sema::CheckBuiltinFunctionCall(FunctionDecl *FDecl, unsigned BuiltinID, case Builtin::BI_bittestandset64: case Builtin::BI_interlockedbittestandreset64: case Builtin::BI_interlockedbittestandset64: -if (CheckBuiltinTargetSupport(*this, BuiltinID, TheCall, - {llvm::Triple::x86_64, llvm::Triple::arm, - llvm::Triple::thumb, llvm::Triple::aarch64})) +if (CheckBuiltinTargetInSupported(*this, BuiltinID, TheCall, + {llvm::Triple::x86_64, llvm::Triple::arm, + llvm::Triple::thumb, + llvm::Triple::aarch64})) return ExprError(); break; diff --git a/clang/test/Analysis/cfref_PR2519.c b/clang/test/Analysis/cfref_PR2519.c index 5636737ffe0e2..8ba608ccf3e55 100644 --- a/clang/test/Analysis/cfref_PR2519.c +++ b/clang/test/Analysis/cfref_PR2519.c @@ -1,3 +1,4 @@ +// UNSUPPORTED: -zos, -aix // RUN: %clang_analyze_cc1 -analyzer-checker=core,osx.cocoa.RetainCount,alpha.core -analyzer-store=region -verify %s // expected-no-diagnostics diff --git a/clang/test/CodeGen/cfstring2.c b/clang/test/CodeGen/cfstring2.c index c760f5dcf5ebb..3d724aaf30bf6 100644 --- a/clang/test/CodeGen/cfstring2.c +++ b/clang/test/CodeGen/cfstring2.c @@ -1,3 +1,4 @@ +// UNSUPPORTED: -zos, -aix // RUN: %clang_cc1 -emit-llvm %s -o %t typedef
[clang] fbf52ca - [AIX] Disable tests that fail because of no 64-bit XCOFF object file support
Author: Jake Egan Date: 2022-01-09T12:25:24-05:00 New Revision: fbf52caf58b3270c84e1cd3f399345272cca09a1 URL: https://github.com/llvm/llvm-project/commit/fbf52caf58b3270c84e1cd3f399345272cca09a1 DIFF: https://github.com/llvm/llvm-project/commit/fbf52caf58b3270c84e1cd3f399345272cca09a1.diff LOG: [AIX] Disable tests that fail because of no 64-bit XCOFF object file support The modified tests fail because 64-bit XCOFF object files are not currently supported on AIX. This patch disables these tests on 64-bit AIX for now. This patch is similar to D111887 except the failures on this patch are on a 64-bit build. Reviewed By: shchenz, #powerpc Differential Revision: https://reviews.llvm.org/D113049 Added: Modified: clang/test/ASTMerge/codegen-body/test.c clang/test/ClangScanDeps/modules-full-by-mod-name.cpp clang/test/ClangScanDeps/resource_directory.c clang/test/lit.cfg.py llvm/test/LTO/X86/remangle_intrinsics.ll llvm/test/lit.cfg.py llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp Removed: diff --git a/clang/test/ASTMerge/codegen-body/test.c b/clang/test/ASTMerge/codegen-body/test.c index 7232bf4164b58..fc5553facbd95 100644 --- a/clang/test/ASTMerge/codegen-body/test.c +++ b/clang/test/ASTMerge/codegen-body/test.c @@ -1,5 +1,5 @@ +// UNSUPPORTED: powerpc64-ibm-aix // RUN: %clang_cc1 -emit-pch -o %t.1.ast %S/Inputs/body1.c // RUN: %clang_cc1 -emit-pch -o %t.2.ast %S/Inputs/body2.c // RUN: %clang_cc1 -emit-obj -o /dev/null -ast-merge %t.1.ast -ast-merge %t.2.ast %s // expected-no-diagnostics - diff --git a/clang/test/ClangScanDeps/modules-full-by-mod-name.cpp b/clang/test/ClangScanDeps/modules-full-by-mod-name.cpp index cecc76840e1d5..e8a067a974d81 100644 --- a/clang/test/ClangScanDeps/modules-full-by-mod-name.cpp +++ b/clang/test/ClangScanDeps/modules-full-by-mod-name.cpp @@ -1,3 +1,4 @@ +// UNSUPPORTED: powerpc64-ibm-aix // RUN: rm -rf %t.dir // RUN: rm -rf %t.cdb // RUN: mkdir -p %t.dir diff --git a/clang/test/ClangScanDeps/resource_directory.c b/clang/test/ClangScanDeps/resource_directory.c index 55d5d90bbcdea..b9e9d219541ba 100644 --- a/clang/test/ClangScanDeps/resource_directory.c +++ b/clang/test/ClangScanDeps/resource_directory.c @@ -1,3 +1,4 @@ +// UNSUPPORTED: powerpc64-ibm-aix // REQUIRES: shell // RUN: rm -rf %t && mkdir %t diff --git a/clang/test/lit.cfg.py b/clang/test/lit.cfg.py index a1a3bf6ee626d..a8efe6c593e98 100644 --- a/clang/test/lit.cfg.py +++ b/clang/test/lit.cfg.py @@ -243,3 +243,24 @@ def calculate_arch_features(arch_string): # Add a vendor-specific feature. if config.clang_vendor_uti: config.available_features.add('clang-vendor=' + config.clang_vendor_uti) + +def exclude_unsupported_files_for_aix(dirname): +for filename in os.listdir(dirname): +source_path = os.path.join( dirname, filename) +if os.path.isdir(source_path): +continue +f = open(source_path, 'r', encoding='ISO-8859-1') +try: + data = f.read() + # 64-bit object files are not supported on AIX, so exclude the tests. + if (any(option in data for option in ('-emit-obj', '-fmodule-format=obj', '-fintegrated-as')) and + '64' in config.target_triple): + config.excludes += [ filename ] +finally: + f.close() + +if 'aix' in config.target_triple: +for directory in ('/CodeGenCXX', '/Misc', '/Modules', '/PCH', '/Driver', + '/ASTMerge/anonymous-fields', '/ASTMerge/injected-class-name-decl'): +exclude_unsupported_files_for_aix(config.test_source_root + directory) + diff --git a/llvm/test/LTO/X86/remangle_intrinsics.ll b/llvm/test/LTO/X86/remangle_intrinsics.ll index 112cace0403b9..523e78e5d30d9 100644 --- a/llvm/test/LTO/X86/remangle_intrinsics.ll +++ b/llvm/test/LTO/X86/remangle_intrinsics.ll @@ -1,3 +1,4 @@ +; UNSUPPORTED: powerpc64-ibm-aix ; RUN: llvm-as < %s > %t1 ; RUN: llvm-as < %p/Inputs/remangle_intrinsics.ll > %t2 ; RUN: llvm-lto %t1 %t2 | FileCheck %s diff --git a/llvm/test/lit.cfg.py b/llvm/test/lit.cfg.py index 0753b0483ef9c..9b80726df5c4a 100644 --- a/llvm/test/lit.cfg.py +++ b/llvm/test/lit.cfg.py @@ -405,3 +405,22 @@ def have_ld64_plugin_support(): if "MemoryWithOrigins" in config.llvm_use_sanitizer: config.available_features.add('use_msan_with_origins') + +def exclude_unsupported_files_for_aix(dirname): + for filename in os.listdir(dirname): + source_path = os.path.join( dirname, filename) + if os.path.isdir(source_path): + continue + f = open(source_path, 'r') + try: + data = f.read() + # 64-bit object files are not supported on AIX, so exclude the tests. + if ('-emit-obj' in data or '-filetype=obj' in data) and '64' in config.target_triple: +config.excludes += [ filename ] + finally: +
[clang] 0796869 - [AIX] Disable unsupported offloading gpu tests
Author: Jake Egan Date: 2021-11-25T15:10:51-05:00 New Revision: 0796869e4e1e517a0f77f8e84d94e1e3525b1061 URL: https://github.com/llvm/llvm-project/commit/0796869e4e1e517a0f77f8e84d94e1e3525b1061 DIFF: https://github.com/llvm/llvm-project/commit/0796869e4e1e517a0f77f8e84d94e1e3525b1061.diff LOG: [AIX] Disable unsupported offloading gpu tests GPUs are not supported on AIX, so this patch sets these tests as unsupported. Reviewed By: stevewan Differential Revision: https://reviews.llvm.org/D114381 Added: Modified: clang/test/Driver/clang-offload-bundler-asserts-on.c clang/test/Driver/clang-offload-bundler.c clang/test/Driver/openmp-offload-gpu.c Removed: diff --git a/clang/test/Driver/clang-offload-bundler-asserts-on.c b/clang/test/Driver/clang-offload-bundler-asserts-on.c index c11028d16343a..7622998c9c182 100644 --- a/clang/test/Driver/clang-offload-bundler-asserts-on.c +++ b/clang/test/Driver/clang-offload-bundler-asserts-on.c @@ -1,6 +1,6 @@ // REQUIRES: x86-registered-target // REQUIRES: asserts -// UNSUPPORTED: darwin +// UNSUPPORTED: darwin, aix // Generate the file we can bundle. // RUN: %clang -O0 -target %itanium_abi_triple %s -c -o %t.o diff --git a/clang/test/Driver/clang-offload-bundler.c b/clang/test/Driver/clang-offload-bundler.c index 9eb305d4d0eeb..a307af4473a1d 100644 --- a/clang/test/Driver/clang-offload-bundler.c +++ b/clang/test/Driver/clang-offload-bundler.c @@ -1,6 +1,6 @@ // REQUIRES: x86-registered-target // REQUIRES: powerpc-registered-target -// UNSUPPORTED: darwin +// UNSUPPORTED: darwin, aix // // Generate all the types of files we can bundle. diff --git a/clang/test/Driver/openmp-offload-gpu.c b/clang/test/Driver/openmp-offload-gpu.c index b1ab7888d5652..dd62b1e5a0760 100644 --- a/clang/test/Driver/openmp-offload-gpu.c +++ b/clang/test/Driver/openmp-offload-gpu.c @@ -8,6 +8,8 @@ // REQUIRES: nvptx-registered-target // REQUIRES: amdgpu-registered-target +// UNSUPPORTED: aix + /// ### /// Check -Xopenmp-target uses one of the archs provided when several archs are used. ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] 9303c7d - [AIX] Define WCHAR_T_TYPE as unsigned int on 64-bit AIX for wchar.c test
Author: Jake Egan Date: 2021-11-10T20:46:57-05:00 New Revision: 9303c7da39678dbcf3397da4944bb9b4c6e1ac65 URL: https://github.com/llvm/llvm-project/commit/9303c7da39678dbcf3397da4944bb9b4c6e1ac65 DIFF: https://github.com/llvm/llvm-project/commit/9303c7da39678dbcf3397da4944bb9b4c6e1ac65.diff LOG: [AIX] Define WCHAR_T_TYPE as unsigned int on 64-bit AIX for wchar.c test The default wchar type on 64-bit AIX is `unsigned int`, so this patch sets `WCHAR_T_TYPE` to `unsigned int` rather than `int`. This patch follows similar reasoning to D110428 except for 64-bit. Reviewed By: daltenty Differential Revision: https://reviews.llvm.org/D113428 Added: Modified: clang/test/Sema/wchar.c Removed: diff --git a/clang/test/Sema/wchar.c b/clang/test/Sema/wchar.c index fff12442ed543..2c88f8db52487 100644 --- a/clang/test/Sema/wchar.c +++ b/clang/test/Sema/wchar.c @@ -14,7 +14,7 @@ typedef __WCHAR_TYPE__ wchar_t; #else #define WCHAR_T_TYPE unsigned int #endif -#elif defined(__arm) || defined(__MVS__) +#elif defined(__arm) || defined(__MVS__) || (defined(_AIX) && defined(__64BIT__)) #define WCHAR_T_TYPE unsigned int #elif defined(__sun) #if defined(__LP64__) ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] 1ff1bca - [AIX][ZOS] Disable tests due to lack of Objective-C support
Author: Jake Egan Date: 2021-10-25T23:32:13-04:00 New Revision: 1ff1bcab970afaef49e2ab8ab7681a12d11ad17d URL: https://github.com/llvm/llvm-project/commit/1ff1bcab970afaef49e2ab8ab7681a12d11ad17d DIFF: https://github.com/llvm/llvm-project/commit/1ff1bcab970afaef49e2ab8ab7681a12d11ad17d.diff LOG: [AIX][ZOS] Disable tests due to lack of Objective-C support AIX and z/OS lack Objective-C support, so mark these tests as unsupported for AIX and z/OS. This patch follows the same reasoning as D109060. Reviewed By: jsji Differential Revision: https://reviews.llvm.org/D112390 Added: Modified: clang/test/Modules/ModuleDebugInfo.cpp clang/test/Modules/ModuleDebugInfo.m clang/test/Modules/clang_module_file_info.m clang/test/Modules/debug-info-moduleimport-in-module.m clang/test/Modules/module-debuginfo-prefix.m llvm/test/DebugInfo/X86/objc_direct.ll Removed: diff --git a/clang/test/Modules/ModuleDebugInfo.cpp b/clang/test/Modules/ModuleDebugInfo.cpp index 836f0d28fb2a2..433002c6cdbe3 100644 --- a/clang/test/Modules/ModuleDebugInfo.cpp +++ b/clang/test/Modules/ModuleDebugInfo.cpp @@ -1,3 +1,4 @@ +// UNSUPPORTED: -zos, -aix // Test that (the same) debug info is emitted for an Objective-C++ // module and a C++ precompiled header. diff --git a/clang/test/Modules/ModuleDebugInfo.m b/clang/test/Modules/ModuleDebugInfo.m index ed576e441e5da..5493d6edc581c 100644 --- a/clang/test/Modules/ModuleDebugInfo.m +++ b/clang/test/Modules/ModuleDebugInfo.m @@ -1,3 +1,4 @@ +// UNSUPPORTED: -zos, -aix // Test that debug info is emitted for an Objective-C module and // a precompiled header. diff --git a/clang/test/Modules/clang_module_file_info.m b/clang/test/Modules/clang_module_file_info.m index b949c68c63903..8ae7483639661 100644 --- a/clang/test/Modules/clang_module_file_info.m +++ b/clang/test/Modules/clang_module_file_info.m @@ -1,4 +1,4 @@ - +// UNSUPPORTED: -zos, -aix @import DependsOnModule; // RUN: rm -rf %t %t-obj diff --git a/clang/test/Modules/debug-info-moduleimport-in-module.m b/clang/test/Modules/debug-info-moduleimport-in-module.m index cde46115d288a..71b863e8bce15 100644 --- a/clang/test/Modules/debug-info-moduleimport-in-module.m +++ b/clang/test/Modules/debug-info-moduleimport-in-module.m @@ -1,3 +1,4 @@ +// UNSUPPORTED: -zos, -aix // Test that an @import inside a module is not represented in the debug info. // REQUIRES: asserts diff --git a/clang/test/Modules/module-debuginfo-prefix.m b/clang/test/Modules/module-debuginfo-prefix.m index da5d86abefd08..5a6f924bf60e7 100644 --- a/clang/test/Modules/module-debuginfo-prefix.m +++ b/clang/test/Modules/module-debuginfo-prefix.m @@ -1,3 +1,4 @@ +// UNSUPPORTED: -zos, -aix // REQUIRES: asserts // Modules: diff --git a/llvm/test/DebugInfo/X86/objc_direct.ll b/llvm/test/DebugInfo/X86/objc_direct.ll index c29dec14a4488..87e0f08241a3e 100644 --- a/llvm/test/DebugInfo/X86/objc_direct.ll +++ b/llvm/test/DebugInfo/X86/objc_direct.ll @@ -1,3 +1,4 @@ +; UNSUPPORTED: -zos, -aix ; RUN: llc < %s -filetype=obj -o %t ; RUN: llvm-dwarfdump -v %t | FileCheck %s ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] 8037481 - [AIX] Disable tests failing due to missing DWARF sections
Author: Jake Egan Date: 2021-10-08T12:06:38-04:00 New Revision: 8037481cb2d729ae3d782c3fed930f69d740fa23 URL: https://github.com/llvm/llvm-project/commit/8037481cb2d729ae3d782c3fed930f69d740fa23 DIFF: https://github.com/llvm/llvm-project/commit/8037481cb2d729ae3d782c3fed930f69d740fa23.diff LOG: [AIX] Disable tests failing due to missing DWARF sections The following tests are failing due to missing DWARF sections. This patch sets these tests as XFAIL/DISABLED on AIX until a more permanent solution is implemented. Reviewed By: shchenz Differential Revision: https://reviews.llvm.org/D111336 Added: Modified: clang/test/Modules/DebugInfoSubmoduleImport.c llvm/test/DebugInfo/Generic/2010-04-19-FramePtr.ll llvm/test/DebugInfo/Generic/accel-table-hash-collisions.ll llvm/test/DebugInfo/Generic/address_space_rvalue.ll llvm/test/DebugInfo/Generic/debug-names-empty-name.ll llvm/test/DebugInfo/Generic/debug-names-hash-collisions.ll llvm/test/DebugInfo/Generic/debug-names-index-type.ll llvm/test/DebugInfo/Generic/debug-names-linkage-name.ll llvm/test/DebugInfo/Generic/debug-names-many-cu.ll llvm/test/DebugInfo/Generic/debug-names-name-collisions.ll llvm/test/DebugInfo/Generic/debug-names-one-cu.ll llvm/test/DebugInfo/Generic/debug-names-two-cu.ll llvm/test/DebugInfo/Generic/export-symbol-anonymous-class.ll llvm/test/DebugInfo/Generic/string-offsets-form.ll llvm/unittests/DebugInfo/DWARF/DWARFDebugInfoTest.cpp Removed: diff --git a/clang/test/Modules/DebugInfoSubmoduleImport.c b/clang/test/Modules/DebugInfoSubmoduleImport.c index b608d300d5feb..d8fbd4eb0775c 100644 --- a/clang/test/Modules/DebugInfoSubmoduleImport.c +++ b/clang/test/Modules/DebugInfoSubmoduleImport.c @@ -1,3 +1,4 @@ +// XFAIL: -aix // RUN: rm -rf %t // RUN: %clang_cc1 -fmodules -fmodule-format=obj -debug-info-kind=limited -dwarf-ext-refs \ // RUN: -fimplicit-module-maps -x c -fmodules-cache-path=%t -I %S/Inputs \ diff --git a/llvm/test/DebugInfo/Generic/2010-04-19-FramePtr.ll b/llvm/test/DebugInfo/Generic/2010-04-19-FramePtr.ll index 77e4fa003865e..44fabb5e09509 100644 --- a/llvm/test/DebugInfo/Generic/2010-04-19-FramePtr.ll +++ b/llvm/test/DebugInfo/Generic/2010-04-19-FramePtr.ll @@ -1,3 +1,4 @@ +; XFAIL: -aix ; RUN: %llc_dwarf -debugger-tune=lldb -asm-verbose -O1 -o - < %s | FileCheck %s ; RUN: %llc_dwarf -debugger-tune=gdb -asm-verbose -O1 -o - < %s | FileCheck %s --check-prefix=DISABLE ; RUN: %llc_dwarf -frame-pointer=all -debugger-tune=lldb -asm-verbose -O1 -o - < %s | FileCheck %s --check-prefix=DISABLE diff --git a/llvm/test/DebugInfo/Generic/accel-table-hash-collisions.ll b/llvm/test/DebugInfo/Generic/accel-table-hash-collisions.ll index 2e321c90b142b..f9c7da04c31e7 100644 --- a/llvm/test/DebugInfo/Generic/accel-table-hash-collisions.ll +++ b/llvm/test/DebugInfo/Generic/accel-table-hash-collisions.ll @@ -1,3 +1,4 @@ +; XFAIL: -aix ; RUN: %llc_dwarf -accel-tables=Apple -filetype=obj -o - < %s \ ; RUN: | llvm-dwarfdump -apple-names - | FileCheck %s diff --git a/llvm/test/DebugInfo/Generic/address_space_rvalue.ll b/llvm/test/DebugInfo/Generic/address_space_rvalue.ll index 60e77a707b4eb..e9e91c267f733 100644 --- a/llvm/test/DebugInfo/Generic/address_space_rvalue.ll +++ b/llvm/test/DebugInfo/Generic/address_space_rvalue.ll @@ -1,3 +1,4 @@ +; XFAIL: -aix ; RUN: %llc_dwarf -O0 -filetype=obj < %s | llvm-dwarfdump -debug-info - | FileCheck %s ; This nonsensical example tests that address spaces for rvalue diff --git a/llvm/test/DebugInfo/Generic/debug-names-empty-name.ll b/llvm/test/DebugInfo/Generic/debug-names-empty-name.ll index 0a7b34c16281d..f578f91392174 100644 --- a/llvm/test/DebugInfo/Generic/debug-names-empty-name.ll +++ b/llvm/test/DebugInfo/Generic/debug-names-empty-name.ll @@ -1,3 +1,4 @@ +; XFAIL: -aix ; RUN: %llc_dwarf -debugger-tune=lldb -accel-tables=Dwarf -filetype=obj -o %t < %s ; RUN: llvm-dwarfdump -find=_GLOBAL__sub_I__ %t | FileCheck --check-prefix=INFO %s ; RUN: llvm-dwarfdump -debug-names %t | FileCheck --check-prefix=NAMES %s diff --git a/llvm/test/DebugInfo/Generic/debug-names-hash-collisions.ll b/llvm/test/DebugInfo/Generic/debug-names-hash-collisions.ll index c105701d95bd1..42c361ab8f15c 100644 --- a/llvm/test/DebugInfo/Generic/debug-names-hash-collisions.ll +++ b/llvm/test/DebugInfo/Generic/debug-names-hash-collisions.ll @@ -1,3 +1,4 @@ +; XFAIL: -aix ; RUN: %llc_dwarf -accel-tables=Dwarf -filetype=obj -o %t < %s ; RUN: llvm-dwarfdump -debug-names %t | FileCheck %s ; RUN: llvm-dwarfdump -debug-names -verify %t | FileCheck --check-prefix=VERIFY %s diff --git a/llvm/test/DebugInfo/Generic/debug-names-index-type.ll b/llvm/test/DebugInfo/Generic/debug-names-index-type.ll index c72b013f4d780..03af245c1d79e 100644 --- a/llvm/test/DebugInfo/Generic/debug-names-index-type.ll +++
[clang] 22f01cd - [AIX][ZOS] Disable LIT tests on AIX and z/OS due to lack of Objective-C support
Author: Jake Egan Date: 2021-09-16T14:04:42-04:00 New Revision: 22f01cd4fc5d2a02a156722e1dab0398fc860e74 URL: https://github.com/llvm/llvm-project/commit/22f01cd4fc5d2a02a156722e1dab0398fc860e74 DIFF: https://github.com/llvm/llvm-project/commit/22f01cd4fc5d2a02a156722e1dab0398fc860e74.diff LOG: [AIX][ZOS] Disable LIT tests on AIX and z/OS due to lack of Objective-C support AIX and z/OS lack Objective-C support, so mark these tests as unsupported for AIX and z/OS. Reviewed By: jsji Differential Revision: https://reviews.llvm.org/D109060 Added: clang/test/CodeGenObjC/lit.local.cfg clang/test/CodeGenObjCXX/lit.local.cfg Modified: clang/test/Import/forward-declared-objc-class/test.m clang/test/Import/objc-arc/test-cleanup-object.m clang/test/Import/objc-autoreleasepool/test.m clang/test/Import/objc-definitions-in-expression/test.m clang/test/Import/objc-method/test.m clang/test/Import/objc-param-decl/test.m clang/test/Import/objc-try-catch/test.m clang/test/Modules/DebugInfoNamespace.cpp clang/test/Modules/DebugInfoTransitiveImport.m clang/test/Modules/ExtDebugInfo.cpp clang/test/Modules/ExtDebugInfo.m clang/test/Modules/ModuleDebugInfoDwoId.cpp clang/test/Modules/ModuleModuleDebugInfo.cpp clang/test/Modules/autolink.m clang/test/Modules/autolinkTBD.m clang/test/Modules/cxx-irgen.cpp clang/test/Modules/debug-info-moduleimport.m clang/test/Modules/direct-module-import.m clang/test/Modules/merge-record-definition-nonmodular.m clang/test/Modules/merge-record-definition-visibility.m clang/test/Modules/merge-record-definition.m clang/test/Modules/module_file_info.m clang/test/Modules/objc-initializer.m clang/test/Modules/pch-used.m clang/test/Modules/use-exportas-for-link.m clang/test/PCH/externally-retained.m clang/test/PCH/irgen-rdar13114142.mm clang/test/PCH/objc_container.m clang/test/PCH/objc_literals.m clang/test/PCH/objc_literals.mm clang/test/PCH/objcxx-ivar-class.mm clang/test/PCH/pending-ids.m Removed: diff --git a/clang/test/CodeGenObjC/lit.local.cfg b/clang/test/CodeGenObjC/lit.local.cfg new file mode 100644 index 0..3957a0545185b --- /dev/null +++ b/clang/test/CodeGenObjC/lit.local.cfg @@ -0,0 +1,2 @@ +if any(target in config.target_triple for target in ('aix', 'zos')): + config.unsupported = True diff --git a/clang/test/CodeGenObjCXX/lit.local.cfg b/clang/test/CodeGenObjCXX/lit.local.cfg new file mode 100644 index 0..3957a0545185b --- /dev/null +++ b/clang/test/CodeGenObjCXX/lit.local.cfg @@ -0,0 +1,2 @@ +if any(target in config.target_triple for target in ('aix', 'zos')): + config.unsupported = True diff --git a/clang/test/Import/forward-declared-objc-class/test.m b/clang/test/Import/forward-declared-objc-class/test.m index 098818be3cb0d..da0a5e037367e 100644 --- a/clang/test/Import/forward-declared-objc-class/test.m +++ b/clang/test/Import/forward-declared-objc-class/test.m @@ -1,3 +1,4 @@ +// UNSUPPORTED: -zos, -aix // RUN: clang-import-test -x objective-c++ -import %S/Inputs/S1.m --import %S/Inputs/S2.m --import %S/Inputs/S3.m -expression %s void expr() { MyClass *c = [MyClass fromInteger:3]; diff --git a/clang/test/Import/objc-arc/test-cleanup-object.m b/clang/test/Import/objc-arc/test-cleanup-object.m index aab1cd377a2e7..00fe9713b0cef 100644 --- a/clang/test/Import/objc-arc/test-cleanup-object.m +++ b/clang/test/Import/objc-arc/test-cleanup-object.m @@ -1,3 +1,4 @@ +// UNSUPPORTED: -zos, -aix // RUN: clang-import-test -x objective-c -objc-arc -import %S/Inputs/cleanup-objects.m -dump-ast -expression %s | FileCheck %s // CHECK: FunctionDecl {{.*}} getObj ' diff --git a/clang/test/Import/objc-autoreleasepool/test.m b/clang/test/Import/objc-autoreleasepool/test.m index f09e7ef4dddfe..52274eb06cdf4 100644 --- a/clang/test/Import/objc-autoreleasepool/test.m +++ b/clang/test/Import/objc-autoreleasepool/test.m @@ -1,3 +1,4 @@ +// UNSUPPORTED: -zos, -aix // RUN: clang-import-test -dump-ast -x objective-c++ -import %S/Inputs/F.m -expression %s | FileCheck %s // CHECK: ObjCAutoreleasePoolStmt diff --git a/clang/test/Import/objc-definitions-in-expression/test.m b/clang/test/Import/objc-definitions-in-expression/test.m index 0c9984731d199..501d82c683433 100644 --- a/clang/test/Import/objc-definitions-in-expression/test.m +++ b/clang/test/Import/objc-definitions-in-expression/test.m @@ -1,3 +1,4 @@ +// UNSUPPORTED: -zos, -aix // RUN: clang-import-test -x objective-c++ -import %S/Inputs/S.m -expression %s @class D; diff --git a/clang/test/Import/objc-method/test.m b/clang/test/Import/objc-method/test.m index 7707110d82495..293af2957dd2b 100644 --- a/clang/test/Import/objc-method/test.m +++ b/clang/test/Import/objc-method/test.m @@ -1,3 +1,4 @@ +// UNSUPPORTED: -zos, -aix // RUN: clang-import-test -x
[clang] 45a7383 - Increase expected line number for ExtDebugInfo.cpp
Author: Jake Egan Date: 2021-09-16T10:03:01-04:00 New Revision: 45a738363ee39754a0e93d9f779bda2cad83fa18 URL: https://github.com/llvm/llvm-project/commit/45a738363ee39754a0e93d9f779bda2cad83fa18 DIFF: https://github.com/llvm/llvm-project/commit/45a738363ee39754a0e93d9f779bda2cad83fa18.diff LOG: Increase expected line number for ExtDebugInfo.cpp This patch increases the expected line number for one of the checks so that it doesn't have to be updated for any added/removed lines in the RUN section. This change is in preparation for the following patch: https://reviews.llvm.org/D109060 Reviewed By: jsji Differential Revision: https://reviews.llvm.org/D109541 Added: Modified: clang/test/Modules/ExtDebugInfo.cpp Removed: diff --git a/clang/test/Modules/ExtDebugInfo.cpp b/clang/test/Modules/ExtDebugInfo.cpp index aff2953b4bb5..00754a90079b 100644 --- a/clang/test/Modules/ExtDebugInfo.cpp +++ b/clang/test/Modules/ExtDebugInfo.cpp @@ -24,6 +24,8 @@ @import DebugCXX; #endif +// Set the line number so that the LIT check expected line number doesn't have to be updated after adding/removing a line in the RUN section. +#line 50 using DebugCXX::Struct; Struct s; @@ -204,8 +206,7 @@ void foo() { // CHECK: ![[GLOBAL_ANON]] = !DICompositeType(tag: DW_TAG_structure_type, // CHECK-SAME: name: "InAnonymousNamespace", {{.*}}DIFlagFwdDecl) - -// CHECK: !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !{{[0-9]+}}, entity: ![[STRUCT]], file: ![[CPP]], line: 27) +// CHECK: !DIImportedEntity(tag: DW_TAG_imported_declaration, scope: !{{[0-9]+}}, entity: ![[STRUCT]], file: ![[CPP]], line: 50) // CHECK: !DICompileUnit( // CHECK-SAME: splitDebugFilename: ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] 37f23ea - [AIX][PowerPC] Define __powerpc and __PPC macros
Author: Jake Egan Date: 2021-09-02T13:32:35-04:00 New Revision: 37f23ea97fdef4484ef33877c6d8464beafd3b0f URL: https://github.com/llvm/llvm-project/commit/37f23ea97fdef4484ef33877c6d8464beafd3b0f DIFF: https://github.com/llvm/llvm-project/commit/37f23ea97fdef4484ef33877c6d8464beafd3b0f.diff LOG: [AIX][PowerPC] Define __powerpc and __PPC macros %%% This patch defines the macros __powerpc and __PPC on AIX to be consistent with XL for AIX. See: https://www.ibm.com/docs/en/xl-c-and-cpp-aix/13.1.0?topic=macros-related-platform Note: GCC does not currently define __powerpc and __PPC so users should prefer the __powerpc__ and __PPC__ forms. %%% Reviewed By: cebowleratibm Differential Revision: https://reviews.llvm.org/D108917 Added: Modified: clang/lib/Basic/Targets/PPC.cpp clang/test/Preprocessor/init-ppc.c Removed: diff --git a/clang/lib/Basic/Targets/PPC.cpp b/clang/lib/Basic/Targets/PPC.cpp index c8afb71e7dfd1..8f16f3d9b475c 100644 --- a/clang/lib/Basic/Targets/PPC.cpp +++ b/clang/lib/Basic/Targets/PPC.cpp @@ -264,6 +264,9 @@ void PPCTargetInfo::getTargetDefines(const LangOptions , } if (getTriple().isOSAIX()) { Builder.defineMacro("__THW_PPC__"); +// Define __PPC and __powerpc for AIX XL C/C++ compatibility +Builder.defineMacro("__PPC"); +Builder.defineMacro("__powerpc"); } // Target properties. diff --git a/clang/test/Preprocessor/init-ppc.c b/clang/test/Preprocessor/init-ppc.c index 4f1c33b1dcc3a..611b16dfb8f7e 100644 --- a/clang/test/Preprocessor/init-ppc.c +++ b/clang/test/Preprocessor/init-ppc.c @@ -322,6 +322,7 @@ // PPC:#define __NATURAL_ALIGNMENT__ 1 // PPC:#define __POINTER_WIDTH__ 32 // PPC:#define __POWERPC__ 1 +// PPC-NOT:#define __PPC 1 // PPC:#define __PPC__ 1 // PPC:#define __PTRDIFF_TYPE__ long int // PPC:#define __PTRDIFF_WIDTH__ 32 @@ -386,6 +387,7 @@ // PPC:#define __WCHAR_WIDTH__ 32 // PPC:#define __WINT_TYPE__ int // PPC:#define __WINT_WIDTH__ 32 +// PPC-NOT:#define __powerpc 1 // PPC:#define __ppc__ 1 // RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc-ibm-aix7.1.0.0 -fno-signed-char < /dev/null | FileCheck -match-full-lines -check-prefix PPC-AIX %s @@ -520,6 +522,7 @@ // PPC-AIX-NOT:#define __NATURAL_ALIGNMENT__ 1 // PPC-AIX:#define __POINTER_WIDTH__ 32 // PPC-AIX:#define __POWERPC__ 1 +// PPC-AIX:#define __PPC 1 // PPC-AIX:#define __PPC__ 1 // PPC-AIX:#define __PTRDIFF_TYPE__ long int // PPC-AIX:#define __PTRDIFF_WIDTH__ 32 @@ -587,6 +590,7 @@ // PPC-AIX:#define __WCHAR_WIDTH__ 16 // PPC-AIX:#define __WINT_TYPE__ int // PPC-AIX:#define __WINT_WIDTH__ 32 +// PPC-AIX:#define __powerpc 1 // PPC-AIX:#define __powerpc__ 1 // PPC-AIX:#define __ppc__ 1 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] 3b39fa3 - [AIX] Define __HOS_AIX__ macro only for AIX target
Author: Jake Egan Date: 2021-08-10T13:03:17-04:00 New Revision: 3b39fa3e2815538187ed8928549a9f27c6a71ef6 URL: https://github.com/llvm/llvm-project/commit/3b39fa3e2815538187ed8928549a9f27c6a71ef6 DIFF: https://github.com/llvm/llvm-project/commit/3b39fa3e2815538187ed8928549a9f27c6a71ef6.diff LOG: [AIX] Define __HOS_AIX__ macro only for AIX target %%% This patch defines the macro __HOS_AIX__ when the target is AIX and without any dependency on the host. The macro indicates that the host is AIX. Defining the macro will help minimize porting pain for existing code compiled with xlc/xlC. xlC never shipped cross-compiling support, so the difference is not observable anyway. %%% This is a follow up to the discussion in https://reviews.llvm.org/D107242. Reviewed By: cebowleratibm, joerg Differential Revision: https://reviews.llvm.org/D107825 Added: Modified: clang/lib/Basic/Targets/OSTargets.h clang/lib/Basic/Targets/PPC.cpp clang/test/Preprocessor/init-ppc.c Removed: clang/test/Preprocessor/host-aix.c clang/test/Preprocessor/not-host-aix.c diff --git a/clang/lib/Basic/Targets/OSTargets.h b/clang/lib/Basic/Targets/OSTargets.h index 28d4c77d47ca..440ec63f9cef 100644 --- a/clang/lib/Basic/Targets/OSTargets.h +++ b/clang/lib/Basic/Targets/OSTargets.h @@ -677,6 +677,7 @@ class AIXTargetInfo : public OSTargetInfo { Builder.defineMacro("_AIX"); Builder.defineMacro("__TOS_AIX__"); +Builder.defineMacro("__HOS_AIX__"); if (Opts.C11) { Builder.defineMacro("__STDC_NO_ATOMICS__"); diff --git a/clang/lib/Basic/Targets/PPC.cpp b/clang/lib/Basic/Targets/PPC.cpp index 711ba2837a9b..33f266f02b69 100644 --- a/clang/lib/Basic/Targets/PPC.cpp +++ b/clang/lib/Basic/Targets/PPC.cpp @@ -14,7 +14,6 @@ #include "clang/Basic/Diagnostic.h" #include "clang/Basic/MacroBuilder.h" #include "clang/Basic/TargetBuiltins.h" -#include "llvm/Support/Host.h" using namespace clang; using namespace clang::targets; @@ -308,11 +307,6 @@ void PPCTargetInfo::getTargetDefines(const LangOptions , Builder.defineMacro("__LONGDOUBLE64"); } - if (llvm::Triple(llvm::sys::getProcessTriple()).isOSAIX() && - getTriple().isOSAIX()) { -Builder.defineMacro("__HOS_AIX__"); - } - // Define this for elfv2 (64-bit only) or 64-bit darwin. if (ABI == "elfv2" || (getTriple().getOS() == llvm::Triple::Darwin && PointerWidth == 64)) diff --git a/clang/test/Preprocessor/host-aix.c b/clang/test/Preprocessor/host-aix.c deleted file mode 100644 index 81d594ba5803.. --- a/clang/test/Preprocessor/host-aix.c +++ /dev/null @@ -1,3 +0,0 @@ -// REQUIRES: system-aix -// RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc-ibm-aix7.1.0.0 -fno-signed-char < /dev/null | FileCheck -match-full-lines -check-prefix PPC-AIX %s -// PPC-AIX:#define __HOS_AIX__ 1 diff --git a/clang/test/Preprocessor/init-ppc.c b/clang/test/Preprocessor/init-ppc.c index fedc1b6c9140..ca61143e8dc9 100644 --- a/clang/test/Preprocessor/init-ppc.c +++ b/clang/test/Preprocessor/init-ppc.c @@ -432,6 +432,7 @@ // PPC-AIX:#define __FLT_MIN_EXP__ (-125) // PPC-AIX:#define __FLT_MIN__ 1.17549435e-38F // PPC-AIX:#define __FLT_RADIX__ 2 +// PPC-AIX:#define __HOS_AIX__ 1 // PPC-AIX:#define __INT16_C_SUFFIX__ // PPC-AIX:#define __INT16_FMTd__ "hd" // PPC-AIX:#define __INT16_FMTi__ "hi" diff --git a/clang/test/Preprocessor/not-host-aix.c b/clang/test/Preprocessor/not-host-aix.c deleted file mode 100644 index d6a2d22a7d25.. --- a/clang/test/Preprocessor/not-host-aix.c +++ /dev/null @@ -1,3 +0,0 @@ -// UNSUPPORTED: system-aix -// RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc-ibm-aix7.1.0.0 -fno-signed-char < /dev/null | FileCheck -match-full-lines -check-prefix PPC-AIX %s -// PPC-AIX-NOT:#define __HOS_AIX__ 1 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] 41bcfe8 - [AIX] Define _ARCH_PPC64 macro for 32-bit
Author: Jake Egan Date: 2021-08-06T10:42:44-04:00 New Revision: 41bcfe81742ed6462096ccb42aa5f2b9d67027fc URL: https://github.com/llvm/llvm-project/commit/41bcfe81742ed6462096ccb42aa5f2b9d67027fc DIFF: https://github.com/llvm/llvm-project/commit/41bcfe81742ed6462096ccb42aa5f2b9d67027fc.diff LOG: [AIX] Define _ARCH_PPC64 macro for 32-bit %%% The macro _ARCH_PPC64 is already defined for 64-bit, but this patch defines it for 32-bit on AIX to follow xlc. See: https://www.ibm.com/docs/en/xl-c-and-cpp-aix/13.1.0?topic=features-macros-related-architecture-settings Note: This change creates a discrepancy between GCC, which defines _ARCH_PPC64 only for 64-bit mode. Tested with SPEC. %%% Reviewed By: cebowleratibm Differential Revision: https://reviews.llvm.org/D107244 Added: Modified: clang/lib/Basic/Targets/PPC.cpp clang/test/Preprocessor/init-ppc.c Removed: diff --git a/clang/lib/Basic/Targets/PPC.cpp b/clang/lib/Basic/Targets/PPC.cpp index 4ee7282c06ce..711ba2837a9b 100644 --- a/clang/lib/Basic/Targets/PPC.cpp +++ b/clang/lib/Basic/Targets/PPC.cpp @@ -257,6 +257,9 @@ void PPCTargetInfo::getTargetDefines(const LangOptions , Builder.defineMacro("__powerpc64__"); Builder.defineMacro("__ppc64__"); Builder.defineMacro("__PPC64__"); + } else if (getTriple().isOSAIX()) { +// The XL compilers on AIX define _ARCH_PPC64 for both 32 and 64-bit modes. +Builder.defineMacro("_ARCH_PPC64"); } if (getTriple().isOSAIX()) { Builder.defineMacro("__THW_PPC__"); diff --git a/clang/test/Preprocessor/init-ppc.c b/clang/test/Preprocessor/init-ppc.c index abf2e919cff6..fedc1b6c9140 100644 --- a/clang/test/Preprocessor/init-ppc.c +++ b/clang/test/Preprocessor/init-ppc.c @@ -391,6 +391,7 @@ // PPC-AIX-NOT:#define __64BIT__ 1 // PPC-AIX:#define _AIX 1 // PPC-AIX:#define _ARCH_PPC 1 +// PPC-AIX:#define _ARCH_PPC64 1 // PPC-AIX:#define _BIG_ENDIAN 1 // PPC-AIX:#define _IBMR2 1 // PPC-AIX:#define _LONG_LONG 1 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] 869d07e - [AIX] Define __HOS_AIX__ macro
Author: Jake Egan Date: 2021-08-06T10:40:13-04:00 New Revision: 869d07ee88a4355f5954ef9e2b2e79ceff225ddb URL: https://github.com/llvm/llvm-project/commit/869d07ee88a4355f5954ef9e2b2e79ceff225ddb DIFF: https://github.com/llvm/llvm-project/commit/869d07ee88a4355f5954ef9e2b2e79ceff225ddb.diff LOG: [AIX] Define __HOS_AIX__ macro %%% This patch defines __HOS_AIX__ macro for AIX in case of a cross compiler implementation. %%% Tested with SPEC. Reviewed By: cebowleratibm Differential Revision: https://reviews.llvm.org/D107242 Added: clang/test/Preprocessor/host-aix.c clang/test/Preprocessor/not-host-aix.c Modified: clang/lib/Basic/Targets/PPC.cpp Removed: diff --git a/clang/lib/Basic/Targets/PPC.cpp b/clang/lib/Basic/Targets/PPC.cpp index a888e22697de..4ee7282c06ce 100644 --- a/clang/lib/Basic/Targets/PPC.cpp +++ b/clang/lib/Basic/Targets/PPC.cpp @@ -14,6 +14,7 @@ #include "clang/Basic/Diagnostic.h" #include "clang/Basic/MacroBuilder.h" #include "clang/Basic/TargetBuiltins.h" +#include "llvm/Support/Host.h" using namespace clang; using namespace clang::targets; @@ -304,6 +305,11 @@ void PPCTargetInfo::getTargetDefines(const LangOptions , Builder.defineMacro("__LONGDOUBLE64"); } + if (llvm::Triple(llvm::sys::getProcessTriple()).isOSAIX() && + getTriple().isOSAIX()) { +Builder.defineMacro("__HOS_AIX__"); + } + // Define this for elfv2 (64-bit only) or 64-bit darwin. if (ABI == "elfv2" || (getTriple().getOS() == llvm::Triple::Darwin && PointerWidth == 64)) diff --git a/clang/test/Preprocessor/host-aix.c b/clang/test/Preprocessor/host-aix.c new file mode 100644 index ..81d594ba5803 --- /dev/null +++ b/clang/test/Preprocessor/host-aix.c @@ -0,0 +1,3 @@ +// REQUIRES: system-aix +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc-ibm-aix7.1.0.0 -fno-signed-char < /dev/null | FileCheck -match-full-lines -check-prefix PPC-AIX %s +// PPC-AIX:#define __HOS_AIX__ 1 diff --git a/clang/test/Preprocessor/not-host-aix.c b/clang/test/Preprocessor/not-host-aix.c new file mode 100644 index ..d6a2d22a7d25 --- /dev/null +++ b/clang/test/Preprocessor/not-host-aix.c @@ -0,0 +1,3 @@ +// UNSUPPORTED: system-aix +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc-ibm-aix7.1.0.0 -fno-signed-char < /dev/null | FileCheck -match-full-lines -check-prefix PPC-AIX %s +// PPC-AIX-NOT:#define __HOS_AIX__ 1 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] 3189dd2 - [AIX] Define __THW_PPC__ macro
Author: Jake Egan Date: 2021-08-06T09:52:26-04:00 New Revision: 3189dd205a581272b9a0cfc614e8f341495fc716 URL: https://github.com/llvm/llvm-project/commit/3189dd205a581272b9a0cfc614e8f341495fc716 DIFF: https://github.com/llvm/llvm-project/commit/3189dd205a581272b9a0cfc614e8f341495fc716.diff LOG: [AIX] Define __THW_PPC__ macro %%% This patch defines the macro __THW_PPC__ for AIX. %%% Tested with SPEC. Reviewed By: cebowleratibm Differential Revision: https://reviews.llvm.org/D107243 Added: Modified: clang/lib/Basic/Targets/PPC.cpp clang/test/Preprocessor/init-ppc.c Removed: diff --git a/clang/lib/Basic/Targets/PPC.cpp b/clang/lib/Basic/Targets/PPC.cpp index 59656888e25f9..a888e22697de9 100644 --- a/clang/lib/Basic/Targets/PPC.cpp +++ b/clang/lib/Basic/Targets/PPC.cpp @@ -257,6 +257,9 @@ void PPCTargetInfo::getTargetDefines(const LangOptions , Builder.defineMacro("__ppc64__"); Builder.defineMacro("__PPC64__"); } + if (getTriple().isOSAIX()) { +Builder.defineMacro("__THW_PPC__"); + } // Target properties. if (getTriple().getArch() == llvm::Triple::ppc64le || diff --git a/clang/test/Preprocessor/init-ppc.c b/clang/test/Preprocessor/init-ppc.c index ac72e6cb027b0..abf2e919cff68 100644 --- a/clang/test/Preprocessor/init-ppc.c +++ b/clang/test/Preprocessor/init-ppc.c @@ -539,6 +539,7 @@ // PPC-AIX:#define __SIZE_TYPE__ long unsigned int // PPC-AIX:#define __SIZE_WIDTH__ 32 // PPC-AIX:#define __THW_BIG_ENDIAN__ 1 +// PPC-AIX:#define __THW_PPC__ 1 // PPC-AIX:#define __TOS_AIX__ 1 // PPC-AIX:#define __UINT16_C_SUFFIX__ // PPC-AIX:#define __UINT16_MAX__ 65535 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] 420e1d4 - [AIX] Define __THW_BIG_ENDIAN__ macro
Author: Jake Egan Date: 2021-08-06T09:46:59-04:00 New Revision: 420e1d4cf45d78a6f9edb935f44dfa4249de16f4 URL: https://github.com/llvm/llvm-project/commit/420e1d4cf45d78a6f9edb935f44dfa4249de16f4 DIFF: https://github.com/llvm/llvm-project/commit/420e1d4cf45d78a6f9edb935f44dfa4249de16f4.diff LOG: [AIX] Define __THW_BIG_ENDIAN__ macro %%% This patch defines the macro __THW_BIG_ENDIAN__ for AIX. %%% Tested with SPEC. Reviewed By: cebowleratibm Differential Revision: https://reviews.llvm.org/D107241 Added: Modified: clang/lib/Basic/Targets/OSTargets.h clang/test/Preprocessor/init-ppc.c Removed: diff --git a/clang/lib/Basic/Targets/OSTargets.h b/clang/lib/Basic/Targets/OSTargets.h index 9780d5036aa23..28d4c77d47caf 100644 --- a/clang/lib/Basic/Targets/OSTargets.h +++ b/clang/lib/Basic/Targets/OSTargets.h @@ -673,6 +673,7 @@ class AIXTargetInfo : public OSTargetInfo { DefineStd(Builder, "unix", Opts); Builder.defineMacro("_IBMR2"); Builder.defineMacro("_POWER"); +Builder.defineMacro("__THW_BIG_ENDIAN__"); Builder.defineMacro("_AIX"); Builder.defineMacro("__TOS_AIX__"); diff --git a/clang/test/Preprocessor/init-ppc.c b/clang/test/Preprocessor/init-ppc.c index 6ebc80717dbc3..ac72e6cb027b0 100644 --- a/clang/test/Preprocessor/init-ppc.c +++ b/clang/test/Preprocessor/init-ppc.c @@ -538,6 +538,7 @@ // PPC-AIX:#define __SIZE_MAX__ 4294967295UL // PPC-AIX:#define __SIZE_TYPE__ long unsigned int // PPC-AIX:#define __SIZE_WIDTH__ 32 +// PPC-AIX:#define __THW_BIG_ENDIAN__ 1 // PPC-AIX:#define __TOS_AIX__ 1 // PPC-AIX:#define __UINT16_C_SUFFIX__ // PPC-AIX:#define __UINT16_MAX__ 65535 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
[clang] 1b52e9b - [AIX] Define __LONGDOUBLE64 macro
Author: Jake Egan Date: 2021-07-22T16:05:14-04:00 New Revision: 1b52e9bac207cd4bdcd9091178527aa39049c270 URL: https://github.com/llvm/llvm-project/commit/1b52e9bac207cd4bdcd9091178527aa39049c270 DIFF: https://github.com/llvm/llvm-project/commit/1b52e9bac207cd4bdcd9091178527aa39049c270.diff LOG: [AIX] Define __LONGDOUBLE64 macro This patch defines the macro __LONGDOUBLE64 for AIX when long double is 8 bytes. Reviewed By: cebowleratibm Differential Revision: https://reviews.llvm.org/D105477 Added: Modified: clang/lib/Basic/Targets/PPC.cpp clang/test/Preprocessor/init-ppc.c Removed: diff --git a/clang/lib/Basic/Targets/PPC.cpp b/clang/lib/Basic/Targets/PPC.cpp index 409504d054f14..59656888e25f9 100644 --- a/clang/lib/Basic/Targets/PPC.cpp +++ b/clang/lib/Basic/Targets/PPC.cpp @@ -296,6 +296,11 @@ void PPCTargetInfo::getTargetDefines(const LangOptions , Builder.defineMacro("__LONG_DOUBLE_IBM128__"); } + if (getTriple().isOSAIX() && Opts.LongDoubleSize == 64) { +assert(LongDoubleWidth == 64); +Builder.defineMacro("__LONGDOUBLE64"); + } + // Define this for elfv2 (64-bit only) or 64-bit darwin. if (ABI == "elfv2" || (getTriple().getOS() == llvm::Triple::Darwin && PointerWidth == 64)) diff --git a/clang/test/Preprocessor/init-ppc.c b/clang/test/Preprocessor/init-ppc.c index 4803a8511c7ed..cbcd10fa1ae52 100644 --- a/clang/test/Preprocessor/init-ppc.c +++ b/clang/test/Preprocessor/init-ppc.c @@ -758,6 +758,9 @@ // PPC-AIX-STDC-N-NOT:#define __STDC_NO_ATOMICS__ 1 // PPC-AIX-STDC-N-NOT:#define __STDC_NO_THREADS__ 1 +// RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc-ibm-aix7.1.0.0 -mlong-double-64 < /dev/null | FileCheck -match-full-lines -check-prefix PPC-AIX-LD64 %s +// PPC-AIX-LD64:#define __LONGDOUBLE64 1 + // RUN: %clang_cc1 -E -dM -ffreestanding -triple=powerpc-unknown-linux-gnu -fno-signed-char < /dev/null | FileCheck -match-full-lines -check-prefix PPC-LINUX %s // // PPC-LINUX:#define _ARCH_PPC 1 ___ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits