Author: John Brawn
Date: 2023-05-24T17:28:41+01:00
New Revision: 78bf8a0a2212c1826ce2a9c0f98c73e9b9b16367

URL: 
https://github.com/llvm/llvm-project/commit/78bf8a0a2212c1826ce2a9c0f98c73e9b9b16367
DIFF: 
https://github.com/llvm/llvm-project/commit/78bf8a0a2212c1826ce2a9c0f98c73e9b9b16367.diff

LOG: [clang] Don't define predefined macros multiple times

Fix several instances of macros being defined multiple times
in several targets. Most of these are just simple duplication in a
TargetInfo or OSTargetInfo of things already defined in
InitializePredefinedMacros or InitializeStandardPredefinedMacros,
but there are a few that aren't:
 * AArch64 defines a couple of feature macros for armv8.1a that are
   handled generically by getTargetDefines.
 * CSKY needs to take care when CPUName and ArchName are the same.
 * Many os/target combinations result in __ELF__ being defined twice.
   Instead define __ELF__ just once in InitPreprocessor based on
   the Triple, which already knows what the object format is based
   on os and target.

These changes shouldn't change the final result of which macros are
defined, with the exception of the changes to __ELF__ where if you
explicitly specify the object type in the triple then this affects
if __ELF__ is defined, e.g. --target=i686-windows-elf results in it
being defined where it wasn't before, but this is more accurate as an
ELF file is in fact generated.

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

Added: 
    clang/test/Preprocessor/predefined-macros-no-warnings.c

Modified: 
    clang/lib/Basic/Targets/AArch64.cpp
    clang/lib/Basic/Targets/ARM.cpp
    clang/lib/Basic/Targets/AVR.cpp
    clang/lib/Basic/Targets/CSKY.cpp
    clang/lib/Basic/Targets/Hexagon.cpp
    clang/lib/Basic/Targets/Le64.cpp
    clang/lib/Basic/Targets/MSP430.cpp
    clang/lib/Basic/Targets/OSTargets.h
    clang/lib/Basic/Targets/RISCV.cpp
    clang/lib/Basic/Targets/VE.cpp
    clang/lib/Frontend/InitPreprocessor.cpp
    clang/test/Preprocessor/init-ve.c

Removed: 
    


################################################################################
diff  --git a/clang/lib/Basic/Targets/AArch64.cpp 
b/clang/lib/Basic/Targets/AArch64.cpp
index 3840139d27434..ea9995fbe82ee 100644
--- a/clang/lib/Basic/Targets/AArch64.cpp
+++ b/clang/lib/Basic/Targets/AArch64.cpp
@@ -238,8 +238,6 @@ void AArch64TargetInfo::fillValidCPUList(
 void AArch64TargetInfo::getTargetDefinesARMV81A(const LangOptions &Opts,
                                                 MacroBuilder &Builder) const {
   Builder.defineMacro("__ARM_FEATURE_QRDMX", "1");
-  Builder.defineMacro("__ARM_FEATURE_ATOMICS", "1");
-  Builder.defineMacro("__ARM_FEATURE_CRC32", "1");
 }
 
 void AArch64TargetInfo::getTargetDefinesARMV82A(const LangOptions &Opts,
@@ -335,16 +333,6 @@ void AArch64TargetInfo::getTargetDefines(const LangOptions 
&Opts,
   Builder.defineMacro("__aarch64__");
   // Inline assembly supports AArch64 flag outputs.
   Builder.defineMacro("__GCC_ASM_FLAG_OUTPUTS__");
-  // For bare-metal.
-  if (getTriple().getOS() == llvm::Triple::UnknownOS &&
-      getTriple().isOSBinFormatELF())
-    Builder.defineMacro("__ELF__");
-
-  // Target properties.
-  if (!getTriple().isOSWindows() && getTriple().isArch64Bit()) {
-    Builder.defineMacro("_LP64");
-    Builder.defineMacro("__LP64__");
-  }
 
   std::string CodeModel = getTargetOpts().CodeModel;
   if (CodeModel == "default")
@@ -1523,7 +1511,6 @@ void DarwinAArch64TargetInfo::getOSDefines(const 
LangOptions &Opts,
   else
     Builder.defineMacro("__ARM64_ARCH_8__");
   Builder.defineMacro("__ARM_NEON__");
-  Builder.defineMacro("__LITTLE_ENDIAN__");
   Builder.defineMacro("__REGISTER_PREFIX__", "");
   Builder.defineMacro("__arm64", "1");
   Builder.defineMacro("__arm64__", "1");

diff  --git a/clang/lib/Basic/Targets/ARM.cpp b/clang/lib/Basic/Targets/ARM.cpp
index 588357c83bfa8..6a57261c01789 100644
--- a/clang/lib/Basic/Targets/ARM.cpp
+++ b/clang/lib/Basic/Targets/ARM.cpp
@@ -711,10 +711,9 @@ void ARMTargetInfo::getTargetDefines(const LangOptions 
&Opts,
   // For bare-metal none-eabi.
   if (getTriple().getOS() == llvm::Triple::UnknownOS &&
       (getTriple().getEnvironment() == llvm::Triple::EABI ||
-       getTriple().getEnvironment() == llvm::Triple::EABIHF)) {
-    Builder.defineMacro("__ELF__");
-    if (Opts.CPlusPlus)
-      Builder.defineMacro("_GNU_SOURCE");
+       getTriple().getEnvironment() == llvm::Triple::EABIHF) &&
+      Opts.CPlusPlus) {
+    Builder.defineMacro("_GNU_SOURCE");
   }
 
   // Target properties.

diff  --git a/clang/lib/Basic/Targets/AVR.cpp b/clang/lib/Basic/Targets/AVR.cpp
index 5c75bae2d8121..85ca4bc30c461 100644
--- a/clang/lib/Basic/Targets/AVR.cpp
+++ b/clang/lib/Basic/Targets/AVR.cpp
@@ -450,7 +450,6 @@ void AVRTargetInfo::getTargetDefines(const LangOptions 
&Opts,
   Builder.defineMacro("AVR");
   Builder.defineMacro("__AVR");
   Builder.defineMacro("__AVR__");
-  Builder.defineMacro("__ELF__");
 
   if (ABI == "avrtiny")
     Builder.defineMacro("__AVR_TINY__", "1");

diff  --git a/clang/lib/Basic/Targets/CSKY.cpp 
b/clang/lib/Basic/Targets/CSKY.cpp
index f272bedc170b6..851f27dbb1e5e 100644
--- a/clang/lib/Basic/Targets/CSKY.cpp
+++ b/clang/lib/Basic/Targets/CSKY.cpp
@@ -33,7 +33,6 @@ bool CSKYTargetInfo::setCPU(const std::string &Name) {
 
 void CSKYTargetInfo::getTargetDefines(const LangOptions &Opts,
                                       MacroBuilder &Builder) const {
-  Builder.defineMacro("__ELF__");
   Builder.defineMacro("__csky__", "2");
   Builder.defineMacro("__CSKY__", "2");
   Builder.defineMacro("__ckcore__", "2");
@@ -52,8 +51,10 @@ void CSKYTargetInfo::getTargetDefines(const LangOptions 
&Opts,
 
   Builder.defineMacro("__" + ArchName.upper() + "__");
   Builder.defineMacro("__" + ArchName.lower() + "__");
-  Builder.defineMacro("__" + CPUName.upper() + "__");
-  Builder.defineMacro("__" + CPUName.lower() + "__");
+  if (ArchName != CPUName) {
+    Builder.defineMacro("__" + CPUName.upper() + "__");
+    Builder.defineMacro("__" + CPUName.lower() + "__");
+  }
 
   // TODO: Add support for BE if BE was supported later
   StringRef endian = "__cskyLE__";

diff  --git a/clang/lib/Basic/Targets/Hexagon.cpp 
b/clang/lib/Basic/Targets/Hexagon.cpp
index 0b98c48fea556..ac747e371fb47 100644
--- a/clang/lib/Basic/Targets/Hexagon.cpp
+++ b/clang/lib/Basic/Targets/Hexagon.cpp
@@ -24,8 +24,6 @@ void HexagonTargetInfo::getTargetDefines(const LangOptions 
&Opts,
   Builder.defineMacro("__qdsp6__", "1");
   Builder.defineMacro("__hexagon__", "1");
 
-  Builder.defineMacro("__ELF__");
-
   // The macro __HVXDBL__ is deprecated.
   bool DefineHvxDbl = false;
 

diff  --git a/clang/lib/Basic/Targets/Le64.cpp 
b/clang/lib/Basic/Targets/Le64.cpp
index 5c961ff81e051..f7afa0e747d67 100644
--- a/clang/lib/Basic/Targets/Le64.cpp
+++ b/clang/lib/Basic/Targets/Le64.cpp
@@ -27,5 +27,4 @@ void Le64TargetInfo::getTargetDefines(const LangOptions &Opts,
                                       MacroBuilder &Builder) const {
   DefineStd(Builder, "unix", Opts);
   defineCPUMacros(Builder, "le64", /*Tuning=*/false);
-  Builder.defineMacro("__ELF__");
 }

diff  --git a/clang/lib/Basic/Targets/MSP430.cpp 
b/clang/lib/Basic/Targets/MSP430.cpp
index de8704fe97e72..844f5d3af7037 100644
--- a/clang/lib/Basic/Targets/MSP430.cpp
+++ b/clang/lib/Basic/Targets/MSP430.cpp
@@ -29,6 +29,5 @@ void MSP430TargetInfo::getTargetDefines(const LangOptions 
&Opts,
                                         MacroBuilder &Builder) const {
   Builder.defineMacro("MSP430");
   Builder.defineMacro("__MSP430__");
-  Builder.defineMacro("__ELF__");
   // FIXME: defines for 
diff erent 'flavours' of MCU
 }

diff  --git a/clang/lib/Basic/Targets/OSTargets.h 
b/clang/lib/Basic/Targets/OSTargets.h
index cb2a68f27edaa..445718ea66b68 100644
--- a/clang/lib/Basic/Targets/OSTargets.h
+++ b/clang/lib/Basic/Targets/OSTargets.h
@@ -41,12 +41,9 @@ class LLVM_LIBRARY_VISIBILITY CloudABITargetInfo : public 
OSTargetInfo<Target> {
   void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
                     MacroBuilder &Builder) const override {
     Builder.defineMacro("__CloudABI__");
-    Builder.defineMacro("__ELF__");
 
     // CloudABI uses ISO/IEC 10646:2012 for wchar_t, char16_t and char32_t.
     Builder.defineMacro("__STDC_ISO_10646__", "201206L");
-    Builder.defineMacro("__STDC_UTF_16__");
-    Builder.defineMacro("__STDC_UTF_32__");
   }
 
 public:
@@ -61,7 +58,6 @@ class LLVM_LIBRARY_VISIBILITY AnanasTargetInfo : public 
OSTargetInfo<Target> {
                     MacroBuilder &Builder) const override {
     // Ananas defines
     Builder.defineMacro("__Ananas__");
-    Builder.defineMacro("__ELF__");
   }
 
 public:
@@ -177,7 +173,6 @@ class LLVM_LIBRARY_VISIBILITY DragonFlyBSDTargetInfo
     // DragonFly defines; list based off of gcc output
     Builder.defineMacro("__DragonFly__");
     Builder.defineMacro("__DragonFly_cc_version", "100001");
-    Builder.defineMacro("__ELF__");
     Builder.defineMacro("__KPRINTF_ATTRIBUTE__");
     Builder.defineMacro("__tune_i386__");
     DefineStd(Builder, "unix", Opts);
@@ -222,7 +217,6 @@ class LLVM_LIBRARY_VISIBILITY FreeBSDTargetInfo : public 
OSTargetInfo<Target> {
     Builder.defineMacro("__FreeBSD_cc_version", Twine(CCVersion));
     Builder.defineMacro("__KPRINTF_ATTRIBUTE__");
     DefineStd(Builder, "unix", Opts);
-    Builder.defineMacro("__ELF__");
 
     // On FreeBSD, wchar_t contains the number of the code point as
     // used by the character set of the locale. These character sets are
@@ -274,7 +268,6 @@ class LLVM_LIBRARY_VISIBILITY KFreeBSDTargetInfo : public 
OSTargetInfo<Target> {
     DefineStd(Builder, "unix", Opts);
     Builder.defineMacro("__FreeBSD_kernel__");
     Builder.defineMacro("__GLIBC__");
-    Builder.defineMacro("__ELF__");
     if (Opts.POSIXThreads)
       Builder.defineMacro("_REENTRANT");
     if (Opts.CPlusPlus)
@@ -293,7 +286,6 @@ class LLVM_LIBRARY_VISIBILITY HaikuTargetInfo : public 
OSTargetInfo<Target> {
                     MacroBuilder &Builder) const override {
     // Haiku defines; list based off of gcc output
     Builder.defineMacro("__HAIKU__");
-    Builder.defineMacro("__ELF__");
     DefineStd(Builder, "unix", Opts);
     if (this->HasFloat128)
       Builder.defineMacro("__FLOAT128__");
@@ -330,7 +322,6 @@ class LLVM_LIBRARY_VISIBILITY HurdTargetInfo : public 
OSTargetInfo<Target> {
     Builder.defineMacro("__gnu_hurd__");
     Builder.defineMacro("__MACH__");
     Builder.defineMacro("__GLIBC__");
-    Builder.defineMacro("__ELF__");
     if (Opts.POSIXThreads)
       Builder.defineMacro("_REENTRANT");
     if (Opts.CPlusPlus)
@@ -355,7 +346,6 @@ class LLVM_LIBRARY_VISIBILITY MinixTargetInfo : public 
OSTargetInfo<Target> {
     Builder.defineMacro("_EM_LSIZE", "4");
     Builder.defineMacro("_EM_FSIZE", "4");
     Builder.defineMacro("_EM_DSIZE", "8");
-    Builder.defineMacro("__ELF__");
     DefineStd(Builder, "unix", Opts);
   }
 
@@ -372,7 +362,6 @@ class LLVM_LIBRARY_VISIBILITY LinuxTargetInfo : public 
OSTargetInfo<Target> {
     // Linux defines; list based off of gcc output
     DefineStd(Builder, "unix", Opts);
     DefineStd(Builder, "linux", Opts);
-    Builder.defineMacro("__ELF__");
     if (Triple.isAndroid()) {
       Builder.defineMacro("__ANDROID__", "1");
       this->PlatformName = "android";
@@ -434,7 +423,6 @@ class LLVM_LIBRARY_VISIBILITY NetBSDTargetInfo : public 
OSTargetInfo<Target> {
     // NetBSD defines; list based off of gcc output
     Builder.defineMacro("__NetBSD__");
     Builder.defineMacro("__unix__");
-    Builder.defineMacro("__ELF__");
     if (Opts.POSIXThreads)
       Builder.defineMacro("_REENTRANT");
   }
@@ -456,7 +444,6 @@ class LLVM_LIBRARY_VISIBILITY OpenBSDTargetInfo : public 
OSTargetInfo<Target> {
 
     Builder.defineMacro("__OpenBSD__");
     DefineStd(Builder, "unix", Opts);
-    Builder.defineMacro("__ELF__");
     if (Opts.POSIXThreads)
       Builder.defineMacro("_REENTRANT");
     if (this->HasFloat128)
@@ -502,10 +489,8 @@ class LLVM_LIBRARY_VISIBILITY PS3PPUTargetInfo : public 
OSTargetInfo<Target> {
   void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
                     MacroBuilder &Builder) const override {
     // PS3 PPU defines.
-    Builder.defineMacro("__PPC__");
     Builder.defineMacro("__PPU__");
     Builder.defineMacro("__CELLOS_LV2__");
-    Builder.defineMacro("__ELF__");
     Builder.defineMacro("__LP32__");
     Builder.defineMacro("_ARCH_PPC64");
     Builder.defineMacro("__powerpc64__");
@@ -533,7 +518,6 @@ class LLVM_LIBRARY_VISIBILITY PSOSTargetInfo : public 
OSTargetInfo<Target> {
     Builder.defineMacro("__FreeBSD_cc_version", "900001");
     Builder.defineMacro("__KPRINTF_ATTRIBUTE__");
     DefineStd(Builder, "unix", Opts);
-    Builder.defineMacro("__ELF__");
     Builder.defineMacro("__SCE__");
     Builder.defineMacro("__STDC_NO_COMPLEX__");
     Builder.defineMacro("__STDC_NO_THREADS__");
@@ -608,7 +592,6 @@ class LLVM_LIBRARY_VISIBILITY RTEMSTargetInfo : public 
OSTargetInfo<Target> {
     // RTEMS defines; list based off of gcc output
 
     Builder.defineMacro("__rtems__");
-    Builder.defineMacro("__ELF__");
     if (Opts.CPlusPlus)
       Builder.defineMacro("_GNU_SOURCE");
   }
@@ -643,7 +626,6 @@ class LLVM_LIBRARY_VISIBILITY SolarisTargetInfo : public 
OSTargetInfo<Target> {
                     MacroBuilder &Builder) const override {
     DefineStd(Builder, "sun", Opts);
     DefineStd(Builder, "unix", Opts);
-    Builder.defineMacro("__ELF__");
     Builder.defineMacro("__svr4__");
     Builder.defineMacro("__SVR4");
     // Solaris headers require _XOPEN_SOURCE to be set to 600 for C99 and
@@ -874,7 +856,6 @@ class LLVM_LIBRARY_VISIBILITY NaClTargetInfo : public 
OSTargetInfo<Target> {
       Builder.defineMacro("_GNU_SOURCE");
 
     DefineStd(Builder, "unix", Opts);
-    Builder.defineMacro("__ELF__");
     Builder.defineMacro("__native_client__");
   }
 
@@ -921,7 +902,6 @@ class LLVM_LIBRARY_VISIBILITY FuchsiaTargetInfo : public 
OSTargetInfo<Target> {
   void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
                     MacroBuilder &Builder) const override {
     Builder.defineMacro("__Fuchsia__");
-    Builder.defineMacro("__ELF__");
     if (Opts.POSIXThreads)
       Builder.defineMacro("_REENTRANT");
     // Required by the libc++ locale support.
@@ -1016,8 +996,6 @@ class LLVM_LIBRARY_VISIBILITY OHOSTargetInfo : public 
OSTargetInfo<Target> {
     // Linux defines; list based off of gcc output
     DefineStd(Builder, "unix", Opts);
 
-    Builder.defineMacro("__ELF__");
-
     // Generic OHOS target defines
     if (Triple.isOHOSFamily()) {
       Builder.defineMacro("__OHOS_FAMILY__", "1");

diff  --git a/clang/lib/Basic/Targets/RISCV.cpp 
b/clang/lib/Basic/Targets/RISCV.cpp
index 5318cf52d0cdd..94c894dfec0b8 100644
--- a/clang/lib/Basic/Targets/RISCV.cpp
+++ b/clang/lib/Basic/Targets/RISCV.cpp
@@ -124,7 +124,6 @@ static unsigned getVersionValue(unsigned MajorVersion, 
unsigned MinorVersion) {
 
 void RISCVTargetInfo::getTargetDefines(const LangOptions &Opts,
                                        MacroBuilder &Builder) const {
-  Builder.defineMacro("__ELF__");
   Builder.defineMacro("__riscv");
   bool Is64Bit = getTriple().getArch() == llvm::Triple::riscv64;
   Builder.defineMacro("__riscv_xlen", Is64Bit ? "64" : "32");

diff  --git a/clang/lib/Basic/Targets/VE.cpp b/clang/lib/Basic/Targets/VE.cpp
index a223b65a8fa7c..67cae8faf6052 100644
--- a/clang/lib/Basic/Targets/VE.cpp
+++ b/clang/lib/Basic/Targets/VE.cpp
@@ -26,14 +26,8 @@ static constexpr Builtin::Info BuiltinInfo[] = {
 
 void VETargetInfo::getTargetDefines(const LangOptions &Opts,
                                     MacroBuilder &Builder) const {
-  Builder.defineMacro("_LP64", "1");
-  Builder.defineMacro("unix", "1");
-  Builder.defineMacro("__unix__", "1");
-  Builder.defineMacro("__linux__", "1");
   Builder.defineMacro("__ve", "1");
   Builder.defineMacro("__ve__", "1");
-  Builder.defineMacro("__STDC_HOSTED__", "1");
-  Builder.defineMacro("__STDC__", "1");
   Builder.defineMacro("__NEC__", "1");
   // FIXME: define __FAST_MATH__ 1 if -ffast-math is enabled
   // FIXME: define __OPTIMIZE__ n if -On is enabled

diff  --git a/clang/lib/Frontend/InitPreprocessor.cpp 
b/clang/lib/Frontend/InitPreprocessor.cpp
index 8082a1924802b..34b478c138d4f 100644
--- a/clang/lib/Frontend/InitPreprocessor.cpp
+++ b/clang/lib/Frontend/InitPreprocessor.cpp
@@ -1299,6 +1299,10 @@ static void InitializePredefinedMacros(const TargetInfo 
&TI,
     Builder.defineMacro("__GLIBCXX_BITSIZE_INT_N_0", "128");
   }
 
+  // ELF targets define __ELF__
+  if (TI.getTriple().isOSBinFormatELF())
+    Builder.defineMacro("__ELF__");
+
   // Get other target #defines.
   TI.getTargetDefines(LangOpts, Builder);
 }

diff  --git a/clang/test/Preprocessor/init-ve.c 
b/clang/test/Preprocessor/init-ve.c
index b3ff47d54c131..13bdb12387db4 100644
--- a/clang/test/Preprocessor/init-ve.c
+++ b/clang/test/Preprocessor/init-ve.c
@@ -2,9 +2,11 @@
 /// REQUIRES: ve-registered-target
 
 // RUN: %clang_cc1 -E -dM -triple=ve < /dev/null | \
-// RUN:     FileCheck -match-full-lines -check-prefix VE %s
+// RUN:     FileCheck -match-full-lines -check-prefixes=VE,VE-HOSTED %s
+// RUN: %clang_cc1 -E -dM -triple=ve -ffreestanding < /dev/null | \
+// RUN:     FileCheck -match-full-lines -check-prefixes=VE,VE-FREESTANDING %s
 // RUN: %clang_cc1 -x c++ -E -dM -triple=ve < /dev/null | \
-// RUN:     FileCheck -match-full-lines -check-prefix VE -check-prefix VE-CXX 
%s
+// RUN:     FileCheck -match-full-lines -check-prefixes=VE,VE-HOSTED,VE-CXX %s
 //
 // VE:#define _LP64 1
 // VE:#define __BIGGEST_ALIGNMENT__ 8
@@ -160,7 +162,8 @@
 // VE:#define __SIZE_TYPE__ long unsigned int
 // VE:#define __SIZE_WIDTH__ 64
 // VE-CXX:#define __STDCPP_DEFAULT_NEW_ALIGNMENT__ 16UL
-// VE:#define __STDC_HOSTED__ 1
+// VE-HOSTED:#define __STDC_HOSTED__ 1
+// VE-FREESTANDING:#define __STDC_HOSTED__ 0
 // VE:#define __UINT16_C_SUFFIX__
 // VE:#define __UINT16_FMTX__ "hX"
 // VE:#define __UINT16_FMTo__ "ho"

diff  --git a/clang/test/Preprocessor/predefined-macros-no-warnings.c 
b/clang/test/Preprocessor/predefined-macros-no-warnings.c
new file mode 100644
index 0000000000000..06f96ddc5a0b0
--- /dev/null
+++ b/clang/test/Preprocessor/predefined-macros-no-warnings.c
@@ -0,0 +1,199 @@
+// Check that the predefined macros don't contain anything that causes a
+// warning, which needs -Wsystem-headers to detect as the predefined macros
+// are in the <built-in> file which is treated as a system header and so has
+// warnings suppressed by default.
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple arc
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple xcore
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple hexagon
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple hexagon-linux
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple lanai
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple aarch64_32-darwin
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple aarch64
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple aarch64-darwin
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple aarch64-cloudabi
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple aarch64-freebsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple aarch64-fuchsia
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple aarch64-linux
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple 
aarch64-linux-openhos
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple aarch64-netbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple aarch64-openbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple aarch64-win32-gnu
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple 
aarch64-win32-msvc
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple aarch64_be
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple 
aarch64_be-freebsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple 
aarch64_be-fuchsia
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple aarch64_be-linux
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple aarch64_be-netbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple arm
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple arm-darwin
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple arm-cloudabi
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple arm-freebsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple arm-fuchsia
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple arm-linux
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple arm-linux-openhos
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple arm-liteos
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple arm-netbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple arm-openbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple arm-rtems
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple arm-nacl
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple arm-win32-cygnus
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple arm-win32-gnu
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple arm-win32-itanium
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple arm-win32-msvc
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple armeb
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple armeb-linux
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple armeb-freebsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple armeb-netbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple armeb-openbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple armeb-rtems
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple avr
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple bpfeb
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple bpfel
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple msp430
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple mips
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple mips-linux
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple mips-freebsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple mips-netbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple mips-rtems
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple mipsel
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple mipsel-linux
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple 
mipsel-linux-openhos
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple mipsel-rtems
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple mipsel-freebsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple mipsel-netbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple mipsel-nacl
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple mips64
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple mips64-linux
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple mips64-rtems
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple mips64-freebsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple mips64-netbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple mips64-openbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple mips64el
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple mips64el-linux
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple mips64el-rtems
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple mips64el-freebsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple mips64el-netbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple mips64el-openbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple m68k
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple m68k-linux
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple m68k-netbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple le32-nacl
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple le64
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple ppc
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple ppc-freebsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple ppc-netbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple ppc-openbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple ppc-rtems
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple ppc-aix
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple ppcle
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple ppcle-linux
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple ppcle-freebsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple ppc64
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple ppc64-linux
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple ppc64-lv2
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple ppc64-freebsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple ppc64-netbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple ppc64-openbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple ppc64-aix
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple ppc64le-
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple ppc64le-linux
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple ppc64le-freebsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple ppc64le-netbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple ppc64le-openbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple nvptx
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple nvptx64
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple amdgcn
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple r600
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple riscv32
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple riscv32-freebsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple riscv32-linux
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple riscv64
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple riscv64-freebsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple riscv64-openbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple riscv64-fuchsia
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple riscv64-linux
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple 
riscv64-linux-openhos
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple sparc
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple sparc-linux
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple sparc-solaris
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple sparc-netbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple sparc-rtems
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple sparcel
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple sparcel-linux
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple sparcel-netbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple sparcel-rtems
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple sparcv9
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple sparcv9-linux
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple sparcv9-solaris
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple sparcv9-netbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple sparcv9-openbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple sparcv9-freebsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple sparcv9-systemz
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple sparcv9-linux
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple sparcv9-zos
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple tce
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple tcele
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple i686
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple i686-darwin
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple i686-ananas
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple i686-cloudabi
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple i686-linux
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple 
i686-linux-android
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple i686-dragonfly
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple i686-netbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple i686-openbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple i686-freebsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple i686-fuchsia
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple i686-kfreebsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple i686-minix
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple i686-solaris
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple i686-win32-cygnus
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple i686-win32-gnu
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple 
i686-win32-itanium
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple i686-win32-msvc
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple i686-haiku
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple i686-rtems
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple i686-nacl
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple i686-elfiamcu
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple i686-hurd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple x86_64
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple x86_64-darwin
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple x86_64-ananas
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple x86_64-cloudabi
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple x86_64-linux
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple 
x86_64-linux-android
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple 
x86_64-linux-openhos
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple x86_64-dragonfly
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple x86_64-netbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple x86_64-openbsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple x86_64-freebsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple x86_64-fuchsia
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple x86_64-kfreebsd
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple x86_64-solaris
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple 
x86_64-win32cygnus
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple x86_64-win32gnu
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple x86_64-win32msvc
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple x86_64-haiku
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple x86_64-nacl
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple x86_64-ps4
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple x86_64-ps5
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple spir
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple spir64
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple spirv32
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple spirv64
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple wasm32
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple wasm32-wasi
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple wasm32-emscripten
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple wasm64
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple wasm64-wasi
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple wasm64-emscripten
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple dxil
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple renderscript32
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple renderscript64
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple ve
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple csky
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple csky-linux
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple loongarch32
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple loongarch32-linux
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple loongarch64
+// RUN: %clang_cc1 %s -Eonly -Wsystem-headers -Werror -triple loongarch64-linux


        
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to