Skip to content

Commit

Permalink
Delete le32/le64 targets
Browse files Browse the repository at this point in the history
They are unused now.

Note: NaCl is still used and is currently expected to be needed until 2022-06
(https://blog.chromium.org/2020/08/changes-to-chrome-app-support-timeline.html).

Differential Revision: https://reviews.llvm.org/D100981
  • Loading branch information
MaskRay committed Apr 22, 2021
1 parent 3011aa1 commit 77ac823
Show file tree
Hide file tree
Showing 29 changed files with 3 additions and 648 deletions.
18 changes: 0 additions & 18 deletions clang/include/clang/Basic/BuiltinsLe64.def

This file was deleted.

13 changes: 1 addition & 12 deletions clang/include/clang/Basic/TargetBuiltins.h
Original file line number Diff line number Diff line change
Expand Up @@ -300,16 +300,6 @@ namespace clang {
};
}

/// 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 {
Expand All @@ -335,8 +325,7 @@ namespace clang {
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.

Expand Down
1 change: 0 additions & 1 deletion clang/include/clang/module.modulemap
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ module Clang_Basic {
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"
Expand Down
1 change: 0 additions & 1 deletion clang/lib/Basic/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,6 @@ add_clang_library(clangBasic
Targets/BPF.cpp
Targets/Hexagon.cpp
Targets/Lanai.cpp
Targets/Le64.cpp
Targets/M68k.cpp
Targets/MSP430.cpp
Targets/Mips.cpp
Expand Down
12 changes: 0 additions & 12 deletions clang/lib/Basic/Targets.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -314,17 +313,6 @@ TargetInfo *AllocateTarget(const llvm::Triple &Triple,
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);
Expand Down
38 changes: 0 additions & 38 deletions clang/lib/Basic/Targets/Le64.cpp

This file was deleted.

63 changes: 0 additions & 63 deletions clang/lib/Basic/Targets/Le64.h

This file was deleted.

6 changes: 2 additions & 4 deletions clang/lib/Basic/Targets/OSTargets.h
Original file line number Diff line number Diff line change
Expand Up @@ -866,11 +866,9 @@ class LLVM_LIBRARY_VISIBILITY NaClTargetInfo : public OSTargetInfo<Target> {
} 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.
}
}
};
Expand Down
7 changes: 0 additions & 7 deletions clang/lib/CodeGen/ItaniumCXXABI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -577,13 +577,6 @@ CodeGen::CGCXXABI *CodeGen::CreateItaniumCXXABI(CodeGenModule &CGM) {
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:
Expand Down
2 changes: 0 additions & 2 deletions clang/lib/CodeGen/TargetInfo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -10970,8 +10970,6 @@ const TargetCodeGenInfo &CodeGenModule::getTargetCodeGenInfo() {
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:
Expand Down
6 changes: 0 additions & 6 deletions clang/lib/Driver/ToolChains/Clang.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3351,12 +3351,6 @@ static void RenderBuiltinOptions(const ToolChain &TC, const llvm::Triple &T,
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) {
Expand Down
1 change: 0 additions & 1 deletion clang/test/CodeGen/ext-int-cc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
61 changes: 0 additions & 61 deletions clang/test/CodeGen/le32-arguments.c

This file was deleted.

27 changes: 0 additions & 27 deletions clang/test/CodeGen/le32-libcall-pow.c

This file was deleted.

5 changes: 0 additions & 5 deletions clang/test/CodeGen/le32-regparm.c

This file was deleted.

32 changes: 0 additions & 32 deletions clang/test/CodeGen/le32-vaarg.c

This file was deleted.

3 changes: 0 additions & 3 deletions clang/test/CodeGen/pr18235.c

This file was deleted.

4 changes: 0 additions & 4 deletions clang/test/CodeGen/target-data.c
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading

0 comments on commit 77ac823

Please sign in to comment.