This revision was landed with ongoing or failed builds.
This revision was automatically updated to reflect the committed changes.
Closed by commit rG77ac823fd285: Delete le32/le64 targets (authored by MaskRay).

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D100981/new/

https://reviews.llvm.org/D100981

Files:
  clang/include/clang/Basic/BuiltinsLe64.def
  clang/include/clang/Basic/TargetBuiltins.h
  clang/include/clang/module.modulemap
  clang/lib/Basic/CMakeLists.txt
  clang/lib/Basic/Targets.cpp
  clang/lib/Basic/Targets/Le64.cpp
  clang/lib/Basic/Targets/Le64.h
  clang/lib/Basic/Targets/OSTargets.h
  clang/lib/CodeGen/ItaniumCXXABI.cpp
  clang/lib/CodeGen/TargetInfo.cpp
  clang/lib/Driver/ToolChains/Clang.cpp
  clang/test/CodeGen/ext-int-cc.c
  clang/test/CodeGen/le32-arguments.c
  clang/test/CodeGen/le32-libcall-pow.c
  clang/test/CodeGen/le32-regparm.c
  clang/test/CodeGen/le32-vaarg.c
  clang/test/CodeGen/pr18235.c
  clang/test/CodeGen/target-data.c
  clang/test/CodeGenCXX/member-function-pointers.cpp
  clang/test/CodeGenCXX/static-init-pnacl.cpp
  clang/test/Driver/le32-toolchain.c
  clang/test/Driver/le32-unknown-nacl.cpp
  clang/test/Driver/le64-unknown-unknown.cpp
  clang/test/Headers/stdarg.cpp
  llvm/include/llvm/ADT/Triple.h
  llvm/lib/Support/Triple.cpp
  llvm/test/CodeGen/Generic/no-target.ll
  llvm/unittests/ADT/TripleTest.cpp
  llvm/utils/gn/secondary/clang/lib/Basic/BUILD.gn

Index: llvm/utils/gn/secondary/clang/lib/Basic/BUILD.gn
===================================================================
--- llvm/utils/gn/secondary/clang/lib/Basic/BUILD.gn
+++ llvm/utils/gn/secondary/clang/lib/Basic/BUILD.gn
@@ -93,7 +93,6 @@
     "Targets/BPF.cpp",
     "Targets/Hexagon.cpp",
     "Targets/Lanai.cpp",
-    "Targets/Le64.cpp",
     "Targets/M68k.cpp",
     "Targets/MSP430.cpp",
     "Targets/Mips.cpp",
Index: llvm/unittests/ADT/TripleTest.cpp
===================================================================
--- llvm/unittests/ADT/TripleTest.cpp
+++ llvm/unittests/ADT/TripleTest.cpp
@@ -1044,14 +1044,6 @@
   EXPECT_EQ(Triple::renderscript32, T.get32BitArchVariant().getArch());
   EXPECT_EQ(Triple::renderscript64, T.get64BitArchVariant().getArch());
 
-  T.setArch(Triple::le32);
-  EXPECT_EQ(Triple::le32, T.get32BitArchVariant().getArch());
-  EXPECT_EQ(Triple::le64, T.get64BitArchVariant().getArch());
-
-  T.setArch(Triple::le64);
-  EXPECT_EQ(Triple::le32, T.get32BitArchVariant().getArch());
-  EXPECT_EQ(Triple::le64, T.get64BitArchVariant().getArch());
-
   T.setArch(Triple::armeb);
   EXPECT_EQ(Triple::armeb, T.get32BitArchVariant().getArch());
   EXPECT_EQ(Triple::aarch64_be, T.get64BitArchVariant().getArch());
@@ -1166,14 +1158,6 @@
   EXPECT_EQ(Triple::tce, T.getBigEndianArchVariant().getArch());
   EXPECT_EQ(Triple::tcele, T.getLittleEndianArchVariant().getArch());
 
-  T.setArch(Triple::le32);
-  EXPECT_EQ(Triple::UnknownArch, T.getBigEndianArchVariant().getArch());
-  EXPECT_EQ(Triple::le32, T.getLittleEndianArchVariant().getArch());
-
-  T.setArch(Triple::le64);
-  EXPECT_EQ(Triple::UnknownArch, T.getBigEndianArchVariant().getArch());
-  EXPECT_EQ(Triple::le64, T.getLittleEndianArchVariant().getArch());
-
   T.setArch(Triple::csky);
   EXPECT_EQ(Triple::UnknownArch, T.getBigEndianArchVariant().getArch());
   EXPECT_EQ(Triple::csky, T.getLittleEndianArchVariant().getArch());
Index: llvm/test/CodeGen/Generic/no-target.ll
===================================================================
--- llvm/test/CodeGen/Generic/no-target.ll
+++ /dev/null
@@ -1,3 +0,0 @@
-; RUN: not llc -mtriple le32-unknown-nacl %s -o - 2>&1 | FileCheck %s
-
-; CHECK: error: unable to get target for 'le32-unknown-nacl'
Index: llvm/lib/Support/Triple.cpp
===================================================================
--- llvm/lib/Support/Triple.cpp
+++ llvm/lib/Support/Triple.cpp
@@ -42,8 +42,6 @@
   case hsail:          return "hsail";
   case kalimba:        return "kalimba";
   case lanai:          return "lanai";
-  case le32:           return "le32";
-  case le64:           return "le64";
   case m68k:           return "m68k";
   case mips64:         return "mips64";
   case mips64el:       return "mips64el";
@@ -136,9 +134,6 @@
   case nvptx:       return "nvvm";
   case nvptx64:     return "nvvm";
 
-  case le32:        return "le32";
-  case le64:        return "le64";
-
   case amdil:
   case amdil64:     return "amdil";
 
@@ -315,8 +310,6 @@
     .Case("xcore", xcore)
     .Case("nvptx", nvptx)
     .Case("nvptx64", nvptx64)
-    .Case("le32", le32)
-    .Case("le64", le64)
     .Case("amdil", amdil)
     .Case("amdil64", amdil64)
     .Case("hsail", hsail)
@@ -448,8 +441,6 @@
     .Case("xcore", Triple::xcore)
     .Case("nvptx", Triple::nvptx)
     .Case("nvptx64", Triple::nvptx64)
-    .Case("le32", Triple::le32)
-    .Case("le64", Triple::le64)
     .Case("amdil", Triple::amdil)
     .Case("amdil64", Triple::amdil64)
     .Case("hsail", Triple::hsail)
@@ -709,8 +700,6 @@
   case Triple::hsail:
   case Triple::kalimba:
   case Triple::lanai:
-  case Triple::le32:
-  case Triple::le64:
   case Triple::m68k:
   case Triple::mips64:
   case Triple::mips64el:
@@ -1284,7 +1273,6 @@
   case llvm::Triple::hsail:
   case llvm::Triple::kalimba:
   case llvm::Triple::lanai:
-  case llvm::Triple::le32:
   case llvm::Triple::m68k:
   case llvm::Triple::mips:
   case llvm::Triple::mipsel:
@@ -1314,7 +1302,6 @@
   case llvm::Triple::bpfeb:
   case llvm::Triple::bpfel:
   case llvm::Triple::hsail64:
-  case llvm::Triple::le64:
   case llvm::Triple::mips64:
   case llvm::Triple::mips64el:
   case llvm::Triple::nvptx64:
@@ -1369,7 +1356,6 @@
   case Triple::hsail:
   case Triple::kalimba:
   case Triple::lanai:
-  case Triple::le32:
   case Triple::m68k:
   case Triple::mips:
   case Triple::mipsel:
@@ -1397,7 +1383,6 @@
   case Triple::aarch64_be:     T.setArch(Triple::armeb);   break;
   case Triple::amdil64:        T.setArch(Triple::amdil);   break;
   case Triple::hsail64:        T.setArch(Triple::hsail);   break;
-  case Triple::le64:           T.setArch(Triple::le32);    break;
   case Triple::mips64:         T.setArch(Triple::mips);    break;
   case Triple::mips64el:       T.setArch(Triple::mipsel);  break;
   case Triple::nvptx64:        T.setArch(Triple::nvptx);   break;
@@ -1441,7 +1426,6 @@
   case Triple::bpfeb:
   case Triple::bpfel:
   case Triple::hsail64:
-  case Triple::le64:
   case Triple::mips64:
   case Triple::mips64el:
   case Triple::nvptx64:
@@ -1463,7 +1447,6 @@
   case Triple::arm:             T.setArch(Triple::aarch64);    break;
   case Triple::armeb:           T.setArch(Triple::aarch64_be); break;
   case Triple::hsail:           T.setArch(Triple::hsail64);    break;
-  case Triple::le32:            T.setArch(Triple::le64);       break;
   case Triple::mips:            T.setArch(Triple::mips64);     break;
   case Triple::mipsel:          T.setArch(Triple::mips64el);   break;
   case Triple::nvptx:           T.setArch(Triple::nvptx64);    break;
@@ -1496,8 +1479,6 @@
   case Triple::hsail64:
   case Triple::hsail:
   case Triple::kalimba:
-  case Triple::le32:
-  case Triple::le64:
   case Triple::msp430:
   case Triple::nvptx64:
   case Triple::nvptx:
@@ -1586,8 +1567,6 @@
   case Triple::hsail64:
   case Triple::hsail:
   case Triple::kalimba:
-  case Triple::le32:
-  case Triple::le64:
   case Triple::mips64el:
   case Triple::mipsel:
   case Triple::msp430:
Index: llvm/include/llvm/ADT/Triple.h
===================================================================
--- llvm/include/llvm/ADT/Triple.h
+++ llvm/include/llvm/ADT/Triple.h
@@ -85,8 +85,6 @@
     xcore,          // XCore: xcore
     nvptx,          // NVPTX: 32-bit
     nvptx64,        // NVPTX: 64-bit
-    le32,           // le32: generic little-endian 32-bit CPU (PNaCl)
-    le64,           // le64: generic little-endian 64-bit CPU (PNaCl)
     amdil,          // AMDIL
     amdil64,        // AMDIL with 64-bit pointers
     hsail,          // AMD HSAIL
Index: clang/test/Headers/stdarg.cpp
===================================================================
--- clang/test/Headers/stdarg.cpp
+++ clang/test/Headers/stdarg.cpp
@@ -8,8 +8,6 @@
 // RUN: %clang_cc1 -emit-llvm -std=c++17 -x c++ %s -triple armv7-apple-darwin9 -target-abi aapcs -o - | FileCheck %s --check-prefix=AAPCS-CXX
 // RUN: %clang_cc1 -emit-llvm -std=c99 -x c %s -triple s390x-linux -o - | FileCheck %s --check-prefix=SYSTEMZ-C
 // RUN: %clang_cc1 -emit-llvm -std=c++17 -x c++ %s -triple s390x-linux -o - | FileCheck %s --check-prefix=SYSTEMZ-CXX
-// RUN: %clang_cc1 -emit-llvm -std=c99 -x c %s -triple le32-nacl -o - | FileCheck %s --check-prefix=PNACL-C
-// RUN: %clang_cc1 -emit-llvm -std=c++17 -x c++ %s -triple le32-nacl -o - | FileCheck %s --check-prefix=PNACL-CXX
 // RUN: %clang_cc1 -emit-llvm -std=c99 -x c %s -triple i686-linux -o - | FileCheck %s --check-prefix=CHARPTR-C
 // RUN: %clang_cc1 -emit-llvm -std=c++17 -x c++ %s -triple i686-linux -o - | FileCheck %s --check-prefix=CHARPTR-CXX
 // RUN: %clang_cc1 -emit-llvm -std=c99 -x c %s -triple xcore -o - | FileCheck %s --check-prefix=VOIDPTR-C
@@ -27,8 +25,6 @@
 // AAPCS-CXX: define {{.*}} @_Z1fiSt9__va_list(i32 %n, [1 x i32] %list.coerce)
 // SYSTEMZ-C: define {{.*}} @f(i32 signext %n, %struct.__va_list_tag* %list)
 // SYSTEMZ-CXX: define {{.*}} @_Z1fiP13__va_list_tag(i32 signext %n, %struct.__va_list_tag* %list)
-// PNACL-C: define {{.*}} @f(i32 %n, i32* %list)
-// PNACL-CXX: define {{.*}} @_Z1fiPi(i32 %n, i32* %list)
 // CHARPTR-C: define {{.*}} @f(i32 %n, i8* %list)
 // CHARPTR-CXX: define {{.*}} @_Z1fiPc(i32 %n, i8* %list)
 // VOIDPTR-C: define {{.*}} @f(i32 %n, i8* %list)
Index: clang/test/Driver/le64-unknown-unknown.cpp
===================================================================
--- clang/test/Driver/le64-unknown-unknown.cpp
+++ /dev/null
@@ -1,137 +0,0 @@
-// RUN: %clang -target le64-unknown-unknown -### %s -emit-llvm-only -c 2>&1 | FileCheck %s -check-prefix=ECHO
-// RUN: %clang -target le64-unknown-unknown %s -emit-llvm -S -c -o - | FileCheck %s
-
-// ECHO: {{.*}} "-cc1" {{.*}}le64-unknown-unknown.c
-
-typedef __builtin_va_list va_list;
-typedef __SIZE_TYPE__ size_t;
-typedef __PTRDIFF_TYPE__ ptrdiff_t;
-
-extern "C" {
-
-// CHECK: @align_c = dso_local global i32 1
-int align_c = __alignof(char);
-
-// CHECK: @align_s = dso_local global i32 2
-int align_s = __alignof(short);
-
-// CHECK: @align_i = dso_local global i32 4
-int align_i = __alignof(int);
-
-// CHECK: @align_l = dso_local global i32 8
-int align_l = __alignof(long);
-
-// CHECK: @align_ll = dso_local global i32 8
-int align_ll = __alignof(long long);
-
-// CHECK: @align_p = dso_local global i32 8
-int align_p = __alignof(void*);
-
-// CHECK: @align_f = dso_local global i32 4
-int align_f = __alignof(float);
-
-// CHECK: @align_d = dso_local global i32 8
-int align_d = __alignof(double);
-
-// CHECK: @align_ld = dso_local global i32 8
-int align_ld = __alignof(long double);
-
-// CHECK: @align_vl = dso_local global i32 4
-int align_vl = __alignof(va_list);
-
-// CHECK: __LITTLE_ENDIAN__defined
-#ifdef __LITTLE_ENDIAN__
-void __LITTLE_ENDIAN__defined() {}
-#endif
-
-// CHECK: __le64defined
-#ifdef __le64
-void __le64defined() {}
-#endif
-
-// CHECK: __le64__defined
-#ifdef __le64__
-void __le64__defined() {}
-#endif
-
-// CHECK: unixdefined
-#ifdef unix
-void unixdefined() {}
-#endif
-
-// CHECK: __unixdefined
-#ifdef __unix
-void __unixdefined() {}
-#endif
-
-// CHECK: __unix__defined
-#ifdef __unix__
-void __unix__defined() {}
-#endif
-
-// CHECK: __ELF__defined
-#ifdef __ELF__
-void __ELF__defined() {}
-#endif
-
-// Check types
-
-// CHECK: signext i8 @check_char()
-char check_char() { return 0; }
-
-// CHECK: signext i16 @check_short()
-short check_short() { return 0; }
-
-// CHECK: i32 @check_int()
-int check_int() { return 0; }
-
-// CHECK: i64 @check_long()
-long check_long() { return 0; }
-
-// CHECK: i64 @check_longlong()
-long long check_longlong() { return 0; }
-
-// CHECK: zeroext i8 @check_uchar()
-unsigned char check_uchar() { return 0; }
-
-// CHECK: zeroext i16 @check_ushort()
-unsigned short check_ushort() { return 0; }
-
-// CHECK: i32 @check_uint()
-unsigned int check_uint() { return 0; }
-
-// CHECK: i64 @check_ulong()
-unsigned long check_ulong() { return 0; }
-
-// CHECK: i64 @check_ulonglong()
-unsigned long long check_ulonglong() { return 0; }
-
-// CHECK: i64 @check_size_t()
-size_t check_size_t() { return 0; }
-
-// CHECK: i64 @check_ptrdiff_t()
-ptrdiff_t check_ptrdiff_t() { return 0; }
-
-// CHECK: float @check_float()
-float check_float() { return 0; }
-
-// CHECK: double @check_double()
-double check_double() { return 0; }
-
-// CHECK: double @check_longdouble()
-long double check_longdouble() { return 0; }
-
-}
-
-template<int> void Switch();
-template<> void Switch<4>();
-template<> void Switch<8>();
-template<> void Switch<16>();
-
-void check_pointer_size() {
-  // CHECK: SwitchILi8
-  Switch<sizeof(void*)>();
-
-  // CHECK: SwitchILi16
-  Switch<sizeof(va_list)>();
-}
Index: clang/test/Driver/le32-unknown-nacl.cpp
===================================================================
--- clang/test/Driver/le32-unknown-nacl.cpp
+++ /dev/null
@@ -1,147 +0,0 @@
-// RUN: %clang -target le32-unknown-nacl -### %s -emit-llvm-only -c 2>&1 | FileCheck %s -check-prefix=ECHO
-// RUN: %clang -target le32-unknown-nacl %s -emit-llvm -S -c -o - | FileCheck %s
-// RUN: %clang -target le32-unknown-nacl -fexperimental-new-pass-manager %s -emit-llvm -S -c -o - | FileCheck %s
-// RUN: %clang -target le32-unknown-nacl %s -emit-llvm -S -c -pthread -o - | FileCheck %s -check-prefix=THREADS
-
-// ECHO: {{.*}} "-cc1" {{.*}}le32-unknown-nacl.c
-
-typedef __builtin_va_list va_list;
-typedef __SIZE_TYPE__ size_t;
-typedef __PTRDIFF_TYPE__ ptrdiff_t;
-
-extern "C" {
-
-// CHECK: @align_c = dso_local global i32 1
-int align_c = __alignof(char);
-
-// CHECK: @align_s = dso_local global i32 2
-int align_s = __alignof(short);
-
-// CHECK: @align_i = dso_local global i32 4
-int align_i = __alignof(int);
-
-// CHECK: @align_l = dso_local global i32 4
-int align_l = __alignof(long);
-
-// CHECK: @align_ll = dso_local global i32 8
-int align_ll = __alignof(long long);
-
-// CHECK: @align_p = dso_local global i32 4
-int align_p = __alignof(void*);
-
-// CHECK: @align_f = dso_local global i32 4
-int align_f = __alignof(float);
-
-// CHECK: @align_d = dso_local global i32 8
-int align_d = __alignof(double);
-
-// CHECK: @align_ld = dso_local global i32 8
-int align_ld = __alignof(long double);
-
-// CHECK: @align_vl = dso_local global i32 4
-int align_vl = __alignof(va_list);
-
-// CHECK: __LITTLE_ENDIAN__defined
-#ifdef __LITTLE_ENDIAN__
-void __LITTLE_ENDIAN__defined() {}
-#endif
-
-// CHECK: __native_client__defined
-#ifdef __native_client__
-void __native_client__defined() {}
-#endif
-
-// CHECK: __le32__defined
-#ifdef __le32__
-void __le32__defined() {}
-#endif
-
-// CHECK: __pnacl__defined
-#ifdef __pnacl__
-void __pnacl__defined() {}
-#endif
-
-// CHECK: unixdefined
-#ifdef unix
-void unixdefined() {}
-#endif
-
-// CHECK: __ELF__defined
-#ifdef __ELF__
-void __ELF__defined() {}
-#endif
-
-// CHECK: _GNU_SOURCEdefined
-#ifdef _GNU_SOURCE
-void _GNU_SOURCEdefined() {}
-#endif
-
-// THREADS: _REENTRANTdefined
-// CHECK: _REENTRANTundefined
-#ifdef _REENTRANT
-void _REENTRANTdefined() {}
-#else
-void _REENTRANTundefined() {}
-#endif
-
-// Check types
-
-// CHECK: signext i8 @check_char()
-char check_char() { return 0; }
-
-// CHECK: signext i16 @check_short()
-short check_short() { return 0; }
-
-// CHECK: i32 @check_int()
-int check_int() { return 0; }
-
-// CHECK: i32 @check_long()
-long check_long() { return 0; }
-
-// CHECK: i64 @check_longlong()
-long long check_longlong() { return 0; }
-
-// CHECK: zeroext i8 @check_uchar()
-unsigned char check_uchar() { return 0; }
-
-// CHECK: zeroext i16 @check_ushort()
-unsigned short check_ushort() { return 0; }
-
-// CHECK: i32 @check_uint()
-unsigned int check_uint() { return 0; }
-
-// CHECK: i32 @check_ulong()
-unsigned long check_ulong() { return 0; }
-
-// CHECK: i64 @check_ulonglong()
-unsigned long long check_ulonglong() { return 0; }
-
-// CHECK: i32 @check_size_t()
-size_t check_size_t() { return 0; }
-
-// CHECK: float @check_float()
-float check_float() { return 0; }
-
-// CHECK: double @check_double()
-double check_double() { return 0; }
-
-// CHECK: double @check_longdouble()
-long double check_longdouble() { return 0; }
-
-}
-
-template<int> void Switch();
-template<> void Switch<4>();
-template<> void Switch<8>();
-template<> void Switch<16>();
-
-void check_pointer_size() {
-  // CHECK: SwitchILi4
-  Switch<sizeof(void*)>();
-
-  // CHECK: SwitchILi8
-  Switch<sizeof(long long)>();
-
-  // CHECK: SwitchILi16
-  Switch<sizeof(va_list)>();
-}
Index: clang/test/Driver/le32-toolchain.c
===================================================================
--- clang/test/Driver/le32-toolchain.c
+++ /dev/null
@@ -1,4 +0,0 @@
-// RUN: %clang -### -target le32-unknown-nacl %s 2>&1 | FileCheck -check-prefix=CHECK-DEFAULT %s
-
-// CHECK-DEFAULT: "-cc1" {{.*}} "-fno-math-builtin"
-
Index: clang/test/CodeGenCXX/static-init-pnacl.cpp
===================================================================
--- clang/test/CodeGenCXX/static-init-pnacl.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %clang_cc1 -emit-llvm -triple=le32-unknown-nacl -o - %s | FileCheck %s
-
-int f();
-
-// Test that PNaCl uses the Itanium/x86 ABI in which the static
-// variable's guard variable is tested via "load i8 and compare with
-// zero" rather than the ARM ABI which uses "load i32 and test the
-// bottom bit".
-void g() {
-  static int a = f();
-}
-// CHECK: [[LOAD:%.*]] = load atomic i8, i8* bitcast (i64* @_ZGVZ1gvE1a to i8*) acquire, align 8
-// CHECK-NEXT: [[GUARD:%.*]] = icmp eq i8 [[LOAD]], 0
-// CHECK-NEXT: br i1 [[GUARD]]
Index: clang/test/CodeGenCXX/member-function-pointers.cpp
===================================================================
--- clang/test/CodeGenCXX/member-function-pointers.cpp
+++ clang/test/CodeGenCXX/member-function-pointers.cpp
@@ -4,8 +4,6 @@
 // RUN: %clang_cc1 %s -emit-llvm -o - -triple=i386-unknown-unknown | FileCheck -check-prefix GLOBAL-LP32 %s
 // RUN: %clang_cc1 %s -emit-llvm -o - -triple=armv7-unknown-unknown | FileCheck -check-prefix GLOBAL-ARM %s
 
-// PNaCl uses the same representation of method pointers as ARM.
-// RUN: %clang_cc1 %s -emit-llvm -o - -triple=le32-unknown-nacl | FileCheck -check-prefix GLOBAL-ARM %s
 // MIPS uses the same representation of method pointers as ARM.
 // RUN: %clang_cc1 %s -emit-llvm -o - -triple=mips-unknown-linux-gnu | FileCheck -check-prefix GLOBAL-ARM %s
 // WebAssembly uses the same representation of method pointers as ARM.
Index: clang/test/CodeGen/target-data.c
===================================================================
--- clang/test/CodeGen/target-data.c
+++ clang/test/CodeGen/target-data.c
@@ -106,10 +106,6 @@
 // RUN: FileCheck %s -check-prefix=MIPS-NACL
 // MIPS-NACL: target datalayout = "e-m:m-p:32:32-i8:8:32-i16:16:32-i64:64-n32-S64"
 
-// RUN: %clang_cc1 -triple le32-nacl -o - -emit-llvm %s | \
-// RUN: FileCheck %s -check-prefix=LE32-NACL
-// LE32-NACL: target datalayout = "e-p:32:32-i64:64"
-
 // RUN: %clang_cc1 -triple wasm32-unknown-unknown -o - -emit-llvm %s | \
 // RUN: FileCheck %s -check-prefix=WEBASSEMBLY32
 // WEBASSEMBLY32: target datalayout = "e-m:e-p:32:32-i64:64-n32:64-S128"
Index: clang/test/CodeGen/pr18235.c
===================================================================
--- clang/test/CodeGen/pr18235.c
+++ /dev/null
@@ -1,3 +0,0 @@
-// RUN: not %clang_cc1 -triple le32-unknown-nacl %s -S -o - 2>&1 | FileCheck %s
-
-// CHECK: error: unable to create target: 'No available targets are compatible with triple "le32-unknown-nacl"'
Index: clang/test/CodeGen/le32-vaarg.c
===================================================================
--- clang/test/CodeGen/le32-vaarg.c
+++ /dev/null
@@ -1,32 +0,0 @@
-// RUN: %clang_cc1 -triple le32-unknown-nacl -emit-llvm -o - %s | FileCheck %s
-#include <stdarg.h>
-
-int get_int(va_list *args) {
-  return va_arg(*args, int);
-}
-// CHECK: define{{.*}} i32 @get_int
-// CHECK: [[RESULT:%[a-z_0-9]+]] = va_arg {{.*}}, i32{{$}}
-// CHECK: store i32 [[RESULT]], i32* [[LOC:%[a-z_0-9]+]]
-// CHECK: [[RESULT2:%[a-z_0-9]+]] = load i32, i32* [[LOC]]
-// CHECK: ret i32 [[RESULT2]]
-
-struct Foo {
-  int x;
-};
-
-struct Foo dest;
-
-void get_struct(va_list *args) {
-  dest = va_arg(*args, struct Foo);
-}
-// CHECK: define{{.*}} void @get_struct
-// CHECK: [[RESULT:%[a-z_0-9]+]] = va_arg {{.*}}, %struct.Foo{{$}}
-// CHECK: store %struct.Foo [[RESULT]], %struct.Foo* [[LOC:%[a-z_0-9]+]]
-// CHECK: [[LOC2:%[a-z_0-9]+]] = bitcast {{.*}} [[LOC]] to i8*
-// CHECK: call void @llvm.memcpy{{.*}}@dest{{.*}}, i8* align {{[0-9]+}} [[LOC2]]
-
-void skip_struct(va_list *args) {
-  va_arg(*args, struct Foo);
-}
-// CHECK: define{{.*}} void @skip_struct
-// CHECK: va_arg {{.*}}, %struct.Foo{{$}}
Index: clang/test/CodeGen/le32-regparm.c
===================================================================
--- clang/test/CodeGen/le32-regparm.c
+++ /dev/null
@@ -1,5 +0,0 @@
-// RUN: %clang_cc1 -triple le32-unknown-nacl %s -fsyntax-only -verify
-// RUN: %clang_cc1 -triple aarch64 %s -fsyntax-only -verify
-
-void __attribute__((regparm(2))) fc_f1(int i, int j, int k) {} // expected-error{{'regparm' is not valid on this platform}}
-
Index: clang/test/CodeGen/le32-libcall-pow.c
===================================================================
--- clang/test/CodeGen/le32-libcall-pow.c
+++ /dev/null
@@ -1,27 +0,0 @@
-// RUN: %clang_cc1 -fno-math-builtin -fmath-errno -emit-llvm -o - %s -triple le32-unknown-nacl | FileCheck %s
-// RUN: %clang_cc1 -fno-math-builtin -emit-llvm -o - %s -triple le32-unknown-nacl | FileCheck %s
-
-// le32 (PNaCl) never generates intrinsics for pow calls, with or without
-// errno, when the -fno-math-builtin flag is passed to -cc1. A separate test
-// makes sure this flag is indeed passed for le32.
-
-float powf(float, float);
-double pow(double, double);
-long double powl(long double, long double);
-
-// CHECK-LABEL: define{{.*}} void @test_pow
-void test_pow(float a0, double a1, long double a2) {
-  // CHECK: call float @powf
-  float l0 = powf(a0, a0);
-
-  // CHECK: call double @pow
-  double l1 = pow(a1, a1);
-
-  // CHECK: call double @powl
-  long double l2 = powl(a2, a2);
-}
-
-// CHECK: declare float @powf(float, float)
-// CHECK: declare double @pow(double, double)
-// CHECK: declare double @powl(double, double)
-
Index: clang/test/CodeGen/le32-arguments.c
===================================================================
--- clang/test/CodeGen/le32-arguments.c
+++ /dev/null
@@ -1,61 +0,0 @@
-// RUN: %clang_cc1 -triple le32-unknown-nacl %s -emit-llvm -o - | FileCheck %s
-
-// Basic argument/attribute tests for le32/PNaCl
-
-// CHECK-LABEL: define{{.*}} void @f0(i32 %i, i32 %j, double %k)
-void f0(int i, long j, double k) {}
-
-typedef struct {
-  int aa;
-  int bb;
-} s1;
-// Structs should be passed byval and not split up
-// CHECK-LABEL: define{{.*}} void @f1(%struct.s1* byval(%struct.s1) align 4 %i)
-void f1(s1 i) {}
-
-typedef struct {
-  int cc;
-} s2;
-// Structs should be returned sret and not simplified by the frontend
-// CHECK-LABEL: define{{.*}} void @f2(%struct.s2* noalias sret(%struct.s2) align 4 %agg.result)
-s2 f2() {
-  s2 foo;
-  return foo;
-}
-
-// CHECK-LABEL: define{{.*}} void @f3(i64 %i)
-void f3(long long i) {}
-
-// i8/i16 should be signext, i32 and higher should not
-// CHECK-LABEL: define{{.*}} void @f4(i8 signext %a, i16 signext %b)
-void f4(char a, short b) {}
-
-// CHECK-LABEL: define{{.*}} void @f5(i8 zeroext %a, i16 zeroext %b)
-void f5(unsigned char a, unsigned short b) {}
-
-
-enum my_enum {
-  ENUM1,
-  ENUM2,
-  ENUM3,
-};
-// Enums should be treated as the underlying i32
-// CHECK-LABEL: define{{.*}} void @f6(i32 %a)
-void f6(enum my_enum a) {}
-
-union simple_union {
-  int a;
-  char b;
-};
-// Unions should be passed as byval structs
-// CHECK-LABEL: define{{.*}} void @f7(%union.simple_union* byval(%union.simple_union) align 4 %s)
-void f7(union simple_union s) {}
-
-typedef struct {
-  int b4 : 4;
-  int b3 : 3;
-  int b8 : 8;
-} bitfield1;
-// Bitfields should be passed as byval structs
-// CHECK-LABEL: define{{.*}} void @f8(%struct.bitfield1* byval(%struct.bitfield1) align 4 %bf1)
-void f8(bitfield1 bf1) {}
Index: clang/test/CodeGen/ext-int-cc.c
===================================================================
--- clang/test/CodeGen/ext-int-cc.c
+++ clang/test/CodeGen/ext-int-cc.c
@@ -2,7 +2,6 @@
 // RUN: %clang_cc1 -triple x86_64-windows-pc -O3 -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s --check-prefixes=WIN64
 // RUN: %clang_cc1 -triple i386-gnu-linux -O3 -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s --check-prefixes=LIN32
 // RUN: %clang_cc1 -triple i386-windows-pc -O3 -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s --check-prefixes=WIN32
-// RUN: %clang_cc1 -triple le32-nacl -O3 -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s --check-prefixes=NACL
 // RUN: %clang_cc1 -triple nvptx64 -O3 -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s --check-prefixes=NVPTX64
 // RUN: %clang_cc1 -triple nvptx -O3 -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s --check-prefixes=NVPTX
 // RUN: %clang_cc1 -triple sparcv9 -O3 -disable-llvm-passes -emit-llvm -o - %s | FileCheck %s --check-prefixes=SPARCV9
Index: clang/lib/Driver/ToolChains/Clang.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Clang.cpp
+++ clang/lib/Driver/ToolChains/Clang.cpp
@@ -3351,12 +3351,6 @@
     StringRef FuncName = Arg->getValue();
     CmdArgs.push_back(Args.MakeArgString("-fno-builtin-" + FuncName));
   }
-
-  // le32-specific flags:
-  //  -fno-math-builtin: clang should not convert math builtins to intrinsics
-  //                     by default.
-  if (TC.getArch() == llvm::Triple::le32)
-    CmdArgs.push_back("-fno-math-builtin");
 }
 
 bool Driver::getDefaultModuleCachePath(SmallVectorImpl<char> &Result) {
Index: clang/lib/CodeGen/TargetInfo.cpp
===================================================================
--- clang/lib/CodeGen/TargetInfo.cpp
+++ clang/lib/CodeGen/TargetInfo.cpp
@@ -10970,8 +10970,6 @@
   default:
     return SetCGInfo(new DefaultTargetCodeGenInfo(Types));
 
-  case llvm::Triple::le32:
-    return SetCGInfo(new PNaClTargetCodeGenInfo(Types));
   case llvm::Triple::m68k:
     return SetCGInfo(new M68kTargetCodeGenInfo(Types));
   case llvm::Triple::mips:
Index: clang/lib/CodeGen/ItaniumCXXABI.cpp
===================================================================
--- clang/lib/CodeGen/ItaniumCXXABI.cpp
+++ clang/lib/CodeGen/ItaniumCXXABI.cpp
@@ -577,13 +577,6 @@
     return new XLCXXABI(CGM);
 
   case TargetCXXABI::GenericItanium:
-    if (CGM.getContext().getTargetInfo().getTriple().getArch()
-        == llvm::Triple::le32) {
-      // For PNaCl, use ARM-style method pointers so that PNaCl code
-      // does not assume anything about the alignment of function
-      // pointers.
-      return new ItaniumCXXABI(CGM, /*UseARMMethodPtrABI=*/true);
-    }
     return new ItaniumCXXABI(CGM);
 
   case TargetCXXABI::Microsoft:
Index: clang/lib/Basic/Targets/OSTargets.h
===================================================================
--- clang/lib/Basic/Targets/OSTargets.h
+++ clang/lib/Basic/Targets/OSTargets.h
@@ -866,11 +866,9 @@
     } else if (Triple.getArch() == llvm::Triple::x86_64) {
       this->resetDataLayout("e-m:e-p:32:32-p270:32:32-p271:32:32-p272:64:64-"
                             "i64:64-n8:16:32:64-S128");
-    } else if (Triple.getArch() == llvm::Triple::mipsel) {
-      // Handled on mips' setDataLayout.
     } else {
-      assert(Triple.getArch() == llvm::Triple::le32);
-      this->resetDataLayout("e-p:32:32-i64:64");
+      assert(Triple.getArch() == llvm::Triple::mipsel);
+      // Handled on mips' setDataLayout.
     }
   }
 };
Index: clang/lib/Basic/Targets/Le64.h
===================================================================
--- clang/lib/Basic/Targets/Le64.h
+++ /dev/null
@@ -1,63 +0,0 @@
-//===--- Le64.h - Declare Le64 target feature support -----------*- C++ -*-===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file declares Le64 TargetInfo objects.
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_LIB_BASIC_TARGETS_LE64_H
-#define LLVM_CLANG_LIB_BASIC_TARGETS_LE64_H
-
-#include "clang/Basic/TargetInfo.h"
-#include "clang/Basic/TargetOptions.h"
-#include "llvm/ADT/Triple.h"
-#include "llvm/Support/Compiler.h"
-
-namespace clang {
-namespace targets {
-
-class LLVM_LIBRARY_VISIBILITY Le64TargetInfo : public TargetInfo {
-  static const Builtin::Info BuiltinInfo[];
-
-public:
-  Le64TargetInfo(const llvm::Triple &Triple, const TargetOptions &)
-      : TargetInfo(Triple) {
-    NoAsmVariants = true;
-    LongWidth = LongAlign = PointerWidth = PointerAlign = 64;
-    MaxAtomicPromoteWidth = MaxAtomicInlineWidth = 64;
-    resetDataLayout("e-m:e-v128:32-v16:16-v32:32-v96:32-n8:16:32:64-S128");
-  }
-
-  void getTargetDefines(const LangOptions &Opts,
-                        MacroBuilder &Builder) const override;
-
-  ArrayRef<Builtin::Info> getTargetBuiltins() const override;
-
-  BuiltinVaListKind getBuiltinVaListKind() const override {
-    return TargetInfo::PNaClABIBuiltinVaList;
-  }
-
-  const char *getClobbers() const override { return ""; }
-
-  ArrayRef<const char *> getGCCRegNames() const override { return None; }
-
-  ArrayRef<TargetInfo::GCCRegAlias> getGCCRegAliases() const override {
-    return None;
-  }
-
-  bool validateAsmConstraint(const char *&Name,
-                             TargetInfo::ConstraintInfo &Info) const override {
-    return false;
-  }
-
-  bool hasProtectedVisibility() const override { return false; }
-};
-
-} // namespace targets
-} // namespace clang
-#endif // LLVM_CLANG_LIB_BASIC_TARGETS_LE64_H
Index: clang/lib/Basic/Targets/Le64.cpp
===================================================================
--- clang/lib/Basic/Targets/Le64.cpp
+++ /dev/null
@@ -1,38 +0,0 @@
-//===--- Le64.cpp - Implement Le64 target feature support -----------------===//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file implements Le64 TargetInfo objects.
-//
-//===----------------------------------------------------------------------===//
-
-#include "Le64.h"
-#include "Targets.h"
-#include "clang/Basic/Builtins.h"
-#include "clang/Basic/MacroBuilder.h"
-#include "clang/Basic/TargetBuiltins.h"
-
-using namespace clang;
-using namespace clang::targets;
-
-const Builtin::Info Le64TargetInfo::BuiltinInfo[] = {
-#define BUILTIN(ID, TYPE, ATTRS)                                               \
-  {#ID, TYPE, ATTRS, nullptr, ALL_LANGUAGES, nullptr},
-#include "clang/Basic/BuiltinsLe64.def"
-};
-
-ArrayRef<Builtin::Info> Le64TargetInfo::getTargetBuiltins() const {
-  return llvm::makeArrayRef(BuiltinInfo, clang::Le64::LastTSBuiltin -
-                                             Builtin::FirstTSBuiltin);
-}
-
-void Le64TargetInfo::getTargetDefines(const LangOptions &Opts,
-                                      MacroBuilder &Builder) const {
-  DefineStd(Builder, "unix", Opts);
-  defineCPUMacros(Builder, "le64", /*Tuning=*/false);
-  Builder.defineMacro("__ELF__");
-}
Index: clang/lib/Basic/Targets.cpp
===================================================================
--- clang/lib/Basic/Targets.cpp
+++ clang/lib/Basic/Targets.cpp
@@ -21,7 +21,6 @@
 #include "Targets/BPF.h"
 #include "Targets/Hexagon.h"
 #include "Targets/Lanai.h"
-#include "Targets/Le64.h"
 #include "Targets/M68k.h"
 #include "Targets/MSP430.h"
 #include "Targets/Mips.h"
@@ -314,17 +313,6 @@
       return new M68kTargetInfo(Triple, Opts);
     }
 
-  case llvm::Triple::le32:
-    switch (os) {
-    case llvm::Triple::NaCl:
-      return new NaClTargetInfo<PNaClTargetInfo>(Triple, Opts);
-    default:
-      return nullptr;
-    }
-
-  case llvm::Triple::le64:
-    return new Le64TargetInfo(Triple, Opts);
-
   case llvm::Triple::ppc:
     if (Triple.isOSDarwin())
       return new DarwinPPC32TargetInfo(Triple, Opts);
Index: clang/lib/Basic/CMakeLists.txt
===================================================================
--- clang/lib/Basic/CMakeLists.txt
+++ clang/lib/Basic/CMakeLists.txt
@@ -77,7 +77,6 @@
   Targets/BPF.cpp
   Targets/Hexagon.cpp
   Targets/Lanai.cpp
-  Targets/Le64.cpp
   Targets/M68k.cpp
   Targets/MSP430.cpp
   Targets/Mips.cpp
Index: clang/include/clang/module.modulemap
===================================================================
--- clang/include/clang/module.modulemap
+++ clang/include/clang/module.modulemap
@@ -40,7 +40,6 @@
   textual header "Basic/BuiltinsHexagon.def"
   textual header "Basic/BuiltinsHexagonDep.def"
   textual header "Basic/BuiltinsHexagonMapCustomDep.def"
-  textual header "Basic/BuiltinsLe64.def"
   textual header "Basic/BuiltinsMips.def"
   textual header "Basic/BuiltinsNEON.def"
   textual header "Basic/BuiltinsNVPTX.def"
Index: clang/include/clang/Basic/TargetBuiltins.h
===================================================================
--- clang/include/clang/Basic/TargetBuiltins.h
+++ clang/include/clang/Basic/TargetBuiltins.h
@@ -300,16 +300,6 @@
     };
   }
 
-  /// Le64 builtins
-  namespace Le64 {
-  enum {
-    LastTIBuiltin = clang::Builtin::FirstTSBuiltin - 1,
-  #define BUILTIN(ID, TYPE, ATTRS) BI##ID,
-  #include "clang/Basic/BuiltinsLe64.def"
-    LastTSBuiltin
-  };
-  }
-
   /// SystemZ builtins
   namespace SystemZ {
     enum {
@@ -335,8 +325,7 @@
        PPC::LastTSBuiltin, NVPTX::LastTSBuiltin, AMDGPU::LastTSBuiltin,
        X86::LastTSBuiltin, VE::LastTSBuiltin, RISCV::LastTSBuiltin,
        Hexagon::LastTSBuiltin, Mips::LastTSBuiltin, XCore::LastTSBuiltin,
-       Le64::LastTSBuiltin, SystemZ::LastTSBuiltin,
-       WebAssembly::LastTSBuiltin});
+       SystemZ::LastTSBuiltin, WebAssembly::LastTSBuiltin});
 
 } // end namespace clang.
 
Index: clang/include/clang/Basic/BuiltinsLe64.def
===================================================================
--- clang/include/clang/Basic/BuiltinsLe64.def
+++ /dev/null
@@ -1,18 +0,0 @@
-//==- BuiltinsLe64.def - Le64 Builtin function database ----------*- C++ -*-==//
-//
-// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
-// See https://llvm.org/LICENSE.txt for license information.
-// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
-//
-//===----------------------------------------------------------------------===//
-//
-// This file defines the Le64-specific builtin function database.  Users of this
-// file must define the BUILTIN macro to make use of this information.
-//
-//===----------------------------------------------------------------------===//
-
-// The format of this database matches clang/Basic/Builtins.def.
-
-BUILTIN(__clear_cache, "vv*v*", "i")
-
-#undef BUILTIN
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to