[llvm] 5165593 - Delete CloudABI support
Brad Smith via llvm-commits
llvm-commits at lists.llvm.org
Tue Aug 29 20:06:05 PDT 2023
Author: Brad Smith
Date: 2023-08-29T22:57:30-04:00
New Revision: 5165593a97a04caad553cb0c213d3b3d359b1853
URL: https://github.com/llvm/llvm-project/commit/5165593a97a04caad553cb0c213d3b3d359b1853
DIFF: https://github.com/llvm/llvm-project/commit/5165593a97a04caad553cb0c213d3b3d359b1853.diff
LOG: Delete CloudABI support
After this D108637 and with FreeBSD -current and now 14 dropping support for
CloudABI I think it is time to consider deleting the CloudABI support.
Reviewed By: MaskRay
Differential Revision: https://reviews.llvm.org/D158920
Added:
Modified:
clang/docs/tools/clang-formatted-files.txt
clang/lib/Basic/Targets.cpp
clang/lib/Basic/Targets/OSTargets.h
clang/lib/Driver/CMakeLists.txt
clang/lib/Driver/Driver.cpp
clang/lib/Driver/ToolChains/Clang.cpp
clang/lib/Driver/ToolChains/CommonArgs.cpp
clang/lib/Lex/InitHeaderSearch.cpp
clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
clang/test/Analysis/security-syntax-checks.m
clang/test/Driver/frame-pointer-elim.c
clang/test/Driver/fsanitize.c
clang/test/Frontend/gnu-mcount.c
clang/test/Preprocessor/init-arm.c
clang/test/Preprocessor/init-x86.c
clang/test/Preprocessor/predefined-macros-no-warnings.c
llvm/include/llvm/MC/MCELFObjectWriter.h
llvm/include/llvm/TargetParser/Triple.h
llvm/lib/TargetParser/Triple.cpp
llvm/unittests/TargetParser/TripleTest.cpp
llvm/utils/gn/secondary/clang/lib/Driver/BUILD.gn
Removed:
clang/lib/Driver/ToolChains/CloudABI.cpp
clang/lib/Driver/ToolChains/CloudABI.h
clang/test/Driver/cloudabi.c
clang/test/Driver/cloudabi.cpp
################################################################################
diff --git a/clang/docs/tools/clang-formatted-files.txt b/clang/docs/tools/clang-formatted-files.txt
index 994350c01f8925..648b2401c32d18 100644
--- a/clang/docs/tools/clang-formatted-files.txt
+++ b/clang/docs/tools/clang-formatted-files.txt
@@ -399,7 +399,6 @@ clang/lib/Driver/ToolChains/AMDGPUOpenMP.cpp
clang/lib/Driver/ToolChains/AMDGPUOpenMP.h
clang/lib/Driver/ToolChains/AVR.cpp
clang/lib/Driver/ToolChains/AVR.h
-clang/lib/Driver/ToolChains/CloudABI.cpp
clang/lib/Driver/ToolChains/CommonArgs.h
clang/lib/Driver/ToolChains/CrossWindows.h
clang/lib/Driver/ToolChains/DragonFly.h
diff --git a/clang/lib/Basic/Targets.cpp b/clang/lib/Basic/Targets.cpp
index d5d523de17ce49..380510e22143d2 100644
--- a/clang/lib/Basic/Targets.cpp
+++ b/clang/lib/Basic/Targets.cpp
@@ -142,9 +142,6 @@ std::unique_ptr<TargetInfo> AllocateTarget(const llvm::Triple &Triple,
return std::make_unique<DarwinAArch64TargetInfo>(Triple, Opts);
switch (os) {
- case llvm::Triple::CloudABI:
- return std::make_unique<CloudABITargetInfo<AArch64leTargetInfo>>(Triple,
- Opts);
case llvm::Triple::FreeBSD:
return std::make_unique<FreeBSDTargetInfo<AArch64leTargetInfo>>(Triple,
Opts);
@@ -202,9 +199,6 @@ std::unique_ptr<TargetInfo> AllocateTarget(const llvm::Triple &Triple,
return std::make_unique<DarwinARMTargetInfo>(Triple, Opts);
switch (os) {
- case llvm::Triple::CloudABI:
- return std::make_unique<CloudABITargetInfo<ARMleTargetInfo>>(Triple,
- Opts);
case llvm::Triple::Linux:
switch (Triple.getEnvironment()) {
default:
@@ -541,9 +535,6 @@ std::unique_ptr<TargetInfo> AllocateTarget(const llvm::Triple &Triple,
return std::make_unique<DarwinI386TargetInfo>(Triple, Opts);
switch (os) {
- case llvm::Triple::CloudABI:
- return std::make_unique<CloudABITargetInfo<X86_32TargetInfo>>(Triple,
- Opts);
case llvm::Triple::Linux: {
switch (Triple.getEnvironment()) {
default:
@@ -603,9 +594,6 @@ std::unique_ptr<TargetInfo> AllocateTarget(const llvm::Triple &Triple,
return std::make_unique<DarwinX86_64TargetInfo>(Triple, Opts);
switch (os) {
- case llvm::Triple::CloudABI:
- return std::make_unique<CloudABITargetInfo<X86_64TargetInfo>>(Triple,
- Opts);
case llvm::Triple::Linux: {
switch (Triple.getEnvironment()) {
default:
diff --git a/clang/lib/Basic/Targets/OSTargets.h b/clang/lib/Basic/Targets/OSTargets.h
index 37e313b248dc13..367defc071417f 100644
--- a/clang/lib/Basic/Targets/OSTargets.h
+++ b/clang/lib/Basic/Targets/OSTargets.h
@@ -34,22 +34,6 @@ class LLVM_LIBRARY_VISIBILITY OSTargetInfo : public TgtInfo {
}
};
-// CloudABI Target
-template <typename Target>
-class LLVM_LIBRARY_VISIBILITY CloudABITargetInfo : public OSTargetInfo<Target> {
-protected:
- void getOSDefines(const LangOptions &Opts, const llvm::Triple &Triple,
- MacroBuilder &Builder) const override {
- Builder.defineMacro("__CloudABI__");
-
- // CloudABI uses ISO/IEC 10646:2012 for wchar_t, char16_t and char32_t.
- Builder.defineMacro("__STDC_ISO_10646__", "201206L");
- }
-
-public:
- using OSTargetInfo<Target>::OSTargetInfo;
-};
-
void getDarwinDefines(MacroBuilder &Builder, const LangOptions &Opts,
const llvm::Triple &Triple, StringRef &PlatformName,
VersionTuple &PlatformMinVersion);
diff --git a/clang/lib/Driver/CMakeLists.txt b/clang/lib/Driver/CMakeLists.txt
index bdf24e771a5dd6..58427e3f83c420 100644
--- a/clang/lib/Driver/CMakeLists.txt
+++ b/clang/lib/Driver/CMakeLists.txt
@@ -47,7 +47,6 @@ add_clang_library(clangDriver
ToolChains/AVR.cpp
ToolChains/BareMetal.cpp
ToolChains/Clang.cpp
- ToolChains/CloudABI.cpp
ToolChains/CommonArgs.cpp
ToolChains/CrossWindows.cpp
ToolChains/CSKYToolChain.cpp
diff --git a/clang/lib/Driver/Driver.cpp b/clang/lib/Driver/Driver.cpp
index 07c4561c990aba..8d5c0efeea0a90 100644
--- a/clang/lib/Driver/Driver.cpp
+++ b/clang/lib/Driver/Driver.cpp
@@ -15,7 +15,6 @@
#include "ToolChains/BareMetal.h"
#include "ToolChains/CSKYToolChain.h"
#include "ToolChains/Clang.h"
-#include "ToolChains/CloudABI.h"
#include "ToolChains/CrossWindows.h"
#include "ToolChains/Cuda.h"
#include "ToolChains/Darwin.h"
@@ -6150,9 +6149,6 @@ const ToolChain &Driver::getToolChain(const ArgList &Args,
case llvm::Triple::Haiku:
TC = std::make_unique<toolchains::Haiku>(*this, Target, Args);
break;
- case llvm::Triple::CloudABI:
- TC = std::make_unique<toolchains::CloudABI>(*this, Target, Args);
- break;
case llvm::Triple::Darwin:
case llvm::Triple::MacOSX:
case llvm::Triple::IOS:
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 4371dee538d917..ca992528ac2e7f 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -466,8 +466,7 @@ static bool useFramePointerForTargetByDefault(const ArgList &Args,
return !areOptimizationsEnabled(Args);
}
- if (Triple.isOSLinux() || Triple.getOS() == llvm::Triple::CloudABI ||
- Triple.isOSHurd()) {
+ if (Triple.isOSLinux() || Triple.isOSHurd()) {
switch (Triple.getArch()) {
// Don't use a frame pointer on linux if optimizing for certain targets.
case llvm::Triple::arm:
diff --git a/clang/lib/Driver/ToolChains/CloudABI.cpp b/clang/lib/Driver/ToolChains/CloudABI.cpp
deleted file mode 100644
index ee2cb10fde7d20..00000000000000
--- a/clang/lib/Driver/ToolChains/CloudABI.cpp
+++ /dev/null
@@ -1,151 +0,0 @@
-//===--- CloudABI.cpp - CloudABI ToolChain Implementations ------*- 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
-//
-//===----------------------------------------------------------------------===//
-
-#include "CloudABI.h"
-#include "CommonArgs.h"
-#include "clang/Driver/Compilation.h"
-#include "clang/Driver/Driver.h"
-#include "clang/Driver/InputInfo.h"
-#include "clang/Driver/Options.h"
-#include "llvm/ADT/SmallString.h"
-#include "llvm/Option/ArgList.h"
-#include "llvm/Support/Path.h"
-
-using namespace clang::driver;
-using namespace clang::driver::tools;
-using namespace clang::driver::toolchains;
-using namespace clang;
-using namespace llvm::opt;
-
-void cloudabi::Linker::ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output,
- const InputInfoList &Inputs,
- const ArgList &Args,
- const char *LinkingOutput) const {
- const ToolChain &ToolChain = getToolChain();
- const Driver &D = ToolChain.getDriver();
- ArgStringList CmdArgs;
-
- // Silence warning for "clang -g foo.o -o foo"
- Args.ClaimAllArgs(options::OPT_g_Group);
- // and "clang -emit-llvm foo.o -o foo"
- Args.ClaimAllArgs(options::OPT_emit_llvm);
- // and for "clang -w foo.o -o foo". Other warning options are already
- // handled somewhere else.
- Args.ClaimAllArgs(options::OPT_w);
-
- if (!D.SysRoot.empty())
- CmdArgs.push_back(Args.MakeArgString("--sysroot=" + D.SysRoot));
-
- // CloudABI only supports static linkage.
- CmdArgs.push_back("-Bstatic");
- CmdArgs.push_back("--no-dynamic-linker");
-
- // Provide PIE linker flags in case PIE is default for the architecture.
- if (ToolChain.isPIEDefault(Args)) {
- CmdArgs.push_back("-pie");
- CmdArgs.push_back("-zrelro");
- }
-
- CmdArgs.push_back("--eh-frame-hdr");
- CmdArgs.push_back("--gc-sections");
-
- if (Output.isFilename()) {
- CmdArgs.push_back("-o");
- CmdArgs.push_back(Output.getFilename());
- } else {
- assert(Output.isNothing() && "Invalid output.");
- }
-
- if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles)) {
- CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath("crt0.o")));
- CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath("crtbegin.o")));
- }
-
- Args.AddAllArgs(CmdArgs, options::OPT_L);
- ToolChain.AddFilePathLibArgs(Args, CmdArgs);
- Args.AddAllArgs(CmdArgs,
- {options::OPT_T_Group, options::OPT_s, options::OPT_t,
- options::OPT_Z_Flag, options::OPT_r});
-
- if (D.isUsingLTO()) {
- assert(!Inputs.empty() && "Must have at least one input.");
- addLTOOptions(ToolChain, Args, CmdArgs, Output, Inputs[0],
- D.getLTOMode() == LTOK_Thin);
- }
-
- AddLinkerInputs(ToolChain, Inputs, Args, CmdArgs, JA);
-
- if (ToolChain.ShouldLinkCXXStdlib(Args))
- ToolChain.AddCXXStdlibLibArgs(Args, CmdArgs);
- if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nodefaultlibs)) {
- CmdArgs.push_back("-lc");
- CmdArgs.push_back("-lcompiler_rt");
- }
-
- if (!Args.hasArg(options::OPT_nostdlib, options::OPT_nostartfiles))
- CmdArgs.push_back(Args.MakeArgString(ToolChain.GetFilePath("crtend.o")));
-
- const char *Exec = Args.MakeArgString(ToolChain.GetLinkerPath());
- C.addCommand(std::make_unique<Command>(JA, *this,
- ResponseFileSupport::AtFileCurCP(),
- Exec, CmdArgs, Inputs, Output));
-}
-
-// CloudABI - CloudABI tool chain which can call ld(1) directly.
-
-CloudABI::CloudABI(const Driver &D, const llvm::Triple &Triple,
- const ArgList &Args)
- : Generic_ELF(D, Triple, Args) {
- SmallString<128> P(getDriver().Dir);
- llvm::sys::path::append(P, "..", getTriple().str(), "lib");
- getFilePaths().push_back(std::string(P.str()));
-}
-
-void CloudABI::addLibCxxIncludePaths(const llvm::opt::ArgList &DriverArgs,
- llvm::opt::ArgStringList &CC1Args) const {
- SmallString<128> P(getDriver().Dir);
- llvm::sys::path::append(P, "..", getTriple().str(), "include/c++/v1");
- addSystemInclude(DriverArgs, CC1Args, P.str());
-}
-
-void CloudABI::AddCXXStdlibLibArgs(const ArgList &Args,
- ArgStringList &CmdArgs) const {
- CmdArgs.push_back("-lc++");
- if (Args.hasArg(options::OPT_fexperimental_library))
- CmdArgs.push_back("-lc++experimental");
- CmdArgs.push_back("-lc++abi");
- CmdArgs.push_back("-lunwind");
-}
-
-Tool *CloudABI::buildLinker() const {
- return new tools::cloudabi::Linker(*this);
-}
-
-bool CloudABI::isPIEDefault(const llvm::opt::ArgList &Args) const {
- // Only enable PIE on architectures that support PC-relative
- // addressing. PC-relative addressing is required, as the process
- // startup code must be able to relocate itself.
- switch (getTriple().getArch()) {
- case llvm::Triple::aarch64:
- case llvm::Triple::x86_64:
- return true;
- default:
- return false;
- }
-}
-
-SanitizerMask CloudABI::getSupportedSanitizers() const {
- SanitizerMask Res = ToolChain::getSupportedSanitizers();
- Res |= SanitizerKind::SafeStack;
- return Res;
-}
-
-SanitizerMask CloudABI::getDefaultSanitizers() const {
- return SanitizerKind::SafeStack;
-}
diff --git a/clang/lib/Driver/ToolChains/CloudABI.h b/clang/lib/Driver/ToolChains/CloudABI.h
deleted file mode 100644
index 8856fe3dde6dad..00000000000000
--- a/clang/lib/Driver/ToolChains/CloudABI.h
+++ /dev/null
@@ -1,70 +0,0 @@
-//===--- CloudABI.h - CloudABI ToolChain Implementations --------*- 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
-//
-//===----------------------------------------------------------------------===//
-
-#ifndef LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_CLOUDABI_H
-#define LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_CLOUDABI_H
-
-#include "Gnu.h"
-#include "clang/Driver/Tool.h"
-#include "clang/Driver/ToolChain.h"
-
-namespace clang {
-namespace driver {
-namespace tools {
-
-/// cloudabi -- Directly call GNU Binutils linker
-namespace cloudabi {
-class LLVM_LIBRARY_VISIBILITY Linker : public Tool {
-public:
- Linker(const ToolChain &TC) : Tool("cloudabi::Linker", "linker", TC) {}
-
- bool hasIntegratedCPP() const override { return false; }
- bool isLinkJob() const override { return true; }
-
- void ConstructJob(Compilation &C, const JobAction &JA,
- const InputInfo &Output, const InputInfoList &Inputs,
- const llvm::opt::ArgList &TCArgs,
- const char *LinkingOutput) const override;
-};
-} // end namespace cloudabi
-} // end namespace tools
-
-namespace toolchains {
-
-class LLVM_LIBRARY_VISIBILITY CloudABI : public Generic_ELF {
-public:
- CloudABI(const Driver &D, const llvm::Triple &Triple,
- const llvm::opt::ArgList &Args);
- bool HasNativeLLVMSupport() const override { return true; }
-
- bool IsMathErrnoDefault() const override { return false; }
- bool IsObjCNonFragileABIDefault() const override { return true; }
-
- CXXStdlibType
- GetCXXStdlibType(const llvm::opt::ArgList &Args) const override {
- return ToolChain::CST_Libcxx;
- }
- void addLibCxxIncludePaths(
- const llvm::opt::ArgList &DriverArgs,
- llvm::opt::ArgStringList &CC1Args) const override;
- void AddCXXStdlibLibArgs(const llvm::opt::ArgList &Args,
- llvm::opt::ArgStringList &CmdArgs) const override;
-
- bool isPIEDefault(const llvm::opt::ArgList &Args) const override;
- SanitizerMask getSupportedSanitizers() const override;
- SanitizerMask getDefaultSanitizers() const override;
-
-protected:
- Tool *buildLinker() const override;
-};
-
-} // end namespace toolchains
-} // end namespace driver
-} // end namespace clang
-
-#endif // LLVM_CLANG_LIB_DRIVER_TOOLCHAINS_CLOUDABI_H
diff --git a/clang/lib/Driver/ToolChains/CommonArgs.cpp b/clang/lib/Driver/ToolChains/CommonArgs.cpp
index 6fa16cac4cbb26..a16469f931884e 100644
--- a/clang/lib/Driver/ToolChains/CommonArgs.cpp
+++ b/clang/lib/Driver/ToolChains/CommonArgs.cpp
@@ -584,9 +584,9 @@ llvm::StringRef tools::getLTOParallelism(const ArgList &Args, const Driver &D) {
return LtoJobsArg->getValue();
}
-// CloudABI and PS4/PS5 use -ffunction-sections and -fdata-sections by default.
+// PS4/PS5 uses -ffunction-sections and -fdata-sections by default.
bool tools::isUseSeparateSections(const llvm::Triple &Triple) {
- return Triple.getOS() == llvm::Triple::CloudABI || Triple.isPS();
+ return Triple.isPS();
}
void tools::addLTOOptions(const ToolChain &ToolChain, const ArgList &Args,
diff --git a/clang/lib/Lex/InitHeaderSearch.cpp b/clang/lib/Lex/InitHeaderSearch.cpp
index f7a319bdc14c4a..1b8ec89600a610 100644
--- a/clang/lib/Lex/InitHeaderSearch.cpp
+++ b/clang/lib/Lex/InitHeaderSearch.cpp
@@ -231,7 +231,6 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
if (HSOpts.UseStandardSystemIncludes) {
switch (os) {
- case llvm::Triple::CloudABI:
case llvm::Triple::ELFIAMCU:
break;
case llvm::Triple::Win32:
@@ -271,13 +270,6 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
}
switch (os) {
- case llvm::Triple::CloudABI: {
- // <sysroot>/<triple>/include
- SmallString<128> P = StringRef(HSOpts.ResourceDir);
- llvm::sys::path::append(P, "../../..", triple.str(), "include");
- AddPath(P, System, false);
- break;
- }
case llvm::Triple::RTEMS:
break;
case llvm::Triple::Win32:
@@ -295,7 +287,6 @@ void InitHeaderSearch::AddDefaultCIncludePaths(const llvm::Triple &triple,
}
switch (os) {
- case llvm::Triple::CloudABI:
case llvm::Triple::RTEMS:
case llvm::Triple::ELFIAMCU:
break;
diff --git a/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp b/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
index 078b0379f5e0fa..1a88615f01697c 100644
--- a/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
+++ b/clang/lib/StaticAnalyzer/Checkers/CheckSecuritySyntaxOnly.cpp
@@ -27,7 +27,6 @@ using namespace ento;
static bool isArc4RandomAvailable(const ASTContext &Ctx) {
const llvm::Triple &T = Ctx.getTargetInfo().getTriple();
return T.getVendor() == llvm::Triple::Apple ||
- T.getOS() == llvm::Triple::CloudABI ||
T.isOSFreeBSD() ||
T.isOSNetBSD() ||
T.isOSOpenBSD() ||
diff --git a/clang/test/Analysis/security-syntax-checks.m b/clang/test/Analysis/security-syntax-checks.m
index 4b143ea1ebf876..ab6a5311f49efa 100644
--- a/clang/test/Analysis/security-syntax-checks.m
+++ b/clang/test/Analysis/security-syntax-checks.m
@@ -17,25 +17,6 @@
// RUN: -analyzer-checker=security.insecureAPI \
// RUN: -analyzer-checker=security.FloatLoopCounter
-// RUN: %clang_analyze_cc1 -triple x86_64-unknown-cloudabi %s -verify -Wno-fortify-source \
-// RUN: -analyzer-checker=security.insecureAPI \
-// RUN: -analyzer-checker=security.FloatLoopCounter
-
-// RUN: %clang_analyze_cc1 -triple x86_64-unknown-cloudabi %s -verify -Wno-fortify-source \
-// RUN: -DUSE_BUILTINS \
-// RUN: -analyzer-checker=security.insecureAPI \
-// RUN: -analyzer-checker=security.FloatLoopCounter
-
-// RUN: %clang_analyze_cc1 -triple x86_64-unknown-cloudabi %s -verify -Wno-fortify-source \
-// RUN: -DVARIANT \
-// RUN: -analyzer-checker=security.insecureAPI \
-// RUN: -analyzer-checker=security.FloatLoopCounter
-
-// RUN: %clang_analyze_cc1 -triple x86_64-unknown-cloudabi %s -verify -Wno-fortify-source \
-// RUN: -DUSE_BUILTINS -DVARIANT \
-// RUN: -analyzer-checker=security.insecureAPI \
-// RUN: -analyzer-checker=security.FloatLoopCounter
-
#ifdef USE_BUILTINS
# define BUILTIN(f) __builtin_ ## f
#else /* USE_BUILTINS */
diff --git a/clang/test/Driver/cloudabi.c b/clang/test/Driver/cloudabi.c
deleted file mode 100644
index 053092a53d4186..00000000000000
--- a/clang/test/Driver/cloudabi.c
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %clang %s -### -target x86_64-unknown-cloudabi 2>&1 | FileCheck %s -check-prefix=SAFESTACK
-// SAFESTACK: "-cc1" "-triple" "x86_64-unknown-cloudabi" {{.*}} "-ffunction-sections" "-fdata-sections" {{.*}} "-fsanitize=safe-stack"
-// SAFESTACK: "-Bstatic" "--no-dynamic-linker" "-pie" "-zrelro" "--eh-frame-hdr" "--gc-sections" "-o" "a.out" "crt0.o" "crtbegin.o" "{{.*}}" "{{.*}}" "-lc" "-lcompiler_rt" "crtend.o"
-
-// RUN: %clang %s -### -target x86_64-unknown-cloudabi -fno-sanitize=safe-stack 2>&1 | FileCheck %s -check-prefix=NOSAFESTACK
-// NOSAFESTACK: "-cc1" "-triple" "x86_64-unknown-cloudabi" {{.*}} "-ffunction-sections" "-fdata-sections"
-// NOSAFESTACK-NOT: "-fsanitize=safe-stack"
-// NOSAFESTACK: "-Bstatic" "--no-dynamic-linker" "-pie" "-zrelro" "--eh-frame-hdr" "--gc-sections" "-o" "a.out" "crt0.o" "crtbegin.o" "{{.*}}" "{{.*}}" "-lc" "-lcompiler_rt" "crtend.o"
-
-// PIE shouldn't be enabled on i686. Just on architectures that provide
-// PC-relative addressing.
-// RUN: %clang %s -### -target i686-unknown-cloudabi 2>&1 | FileCheck %s -check-prefix=NOPIE
-// NOPIE: "-cc1" "-triple" "i686-unknown-cloudabi" {{.*}} "-ffunction-sections" "-fdata-sections" {{.*}} "-fsanitize=safe-stack"
-// NOPIE: "-Bstatic" "--no-dynamic-linker" "--eh-frame-hdr" "--gc-sections" "-o" "a.out" "crt0.o" "crtbegin.o" "{{.*}}" "{{.*}}" "-lc" "-lcompiler_rt" "crtend.o"
diff --git a/clang/test/Driver/cloudabi.cpp b/clang/test/Driver/cloudabi.cpp
deleted file mode 100644
index f9e9ba5cb42768..00000000000000
--- a/clang/test/Driver/cloudabi.cpp
+++ /dev/null
@@ -1,14 +0,0 @@
-// RUN: %clangxx %s -### -target x86_64-unknown-cloudabi 2>&1 | FileCheck %s -check-prefix=SAFESTACK
-// SAFESTACK: "-cc1" "-triple" "x86_64-unknown-cloudabi" {{.*}} "-ffunction-sections" "-fdata-sections" {{.*}} "-fsanitize=safe-stack"
-// SAFESTACK: "-Bstatic" "--no-dynamic-linker" "-pie" "-zrelro" "--eh-frame-hdr" "--gc-sections" "-o" "a.out" "crt0.o" "crtbegin.o" "{{.*}}" "{{.*}}" "-lc++" "-lc++abi" "-lunwind" "-lc" "-lcompiler_rt" "crtend.o"
-
-// RUN: %clangxx %s -### -target x86_64-unknown-cloudabi -fno-sanitize=safe-stack 2>&1 | FileCheck %s -check-prefix=NOSAFESTACK
-// NOSAFESTACK: "-cc1" "-triple" "x86_64-unknown-cloudabi" {{.*}} "-ffunction-sections" "-fdata-sections"
-// NOSAFESTACK-NOT: "-fsanitize=safe-stack"
-// NOSAFESTACK: "-Bstatic" "--no-dynamic-linker" "-pie" "-zrelro" "--eh-frame-hdr" "--gc-sections" "-o" "a.out" "crt0.o" "crtbegin.o" "{{.*}}" "{{.*}}" "-lc++" "-lc++abi" "-lunwind" "-lc" "-lcompiler_rt" "crtend.o"
-
-// PIE shouldn't be enabled on i686. Just on architectures that provide
-// PC-relative addressing.
-// RUN: %clangxx %s -### -target i686-unknown-cloudabi 2>&1 | FileCheck %s -check-prefix=NOPIE
-// NOPIE: "-cc1" "-triple" "i686-unknown-cloudabi" {{.*}} "-ffunction-sections" "-fdata-sections" {{.*}} "-fsanitize=safe-stack"
-// NOPIE: "-Bstatic" "--no-dynamic-linker" "--eh-frame-hdr" "--gc-sections" "-o" "a.out" "crt0.o" "crtbegin.o" "{{.*}}" "{{.*}}" "-lc++" "-lc++abi" "-lunwind" "-lc" "-lcompiler_rt" "crtend.o"
diff --git a/clang/test/Driver/frame-pointer-elim.c b/clang/test/Driver/frame-pointer-elim.c
index b02698dae188b7..847c5b7b0b01f3 100644
--- a/clang/test/Driver/frame-pointer-elim.c
+++ b/clang/test/Driver/frame-pointer-elim.c
@@ -47,13 +47,6 @@
// CHECK-NO-MIX-OMIT-FP-PG: '-fomit-frame-pointer' not allowed with '-pg'
// CHECK-MIX-NO-OMIT-FP-PG-NOT: '-fomit-frame-pointer' not allowed with '-pg'
-// CloudABI follows the same rules as Linux.
-// RUN: %clang -### -target x86_64-unknown-cloudabi -S -O1 %s 2>&1 | \
-// RUN: FileCheck --check-prefix=KEEP-NONE %s
-
-// RUN: %clang -### -target x86_64-unknown-cloudabi -S %s 2>&1 | \
-// RUN: FileCheck --check-prefix=KEEP-ALL %s
-
// NetBSD follows the same rules as Linux.
// RUN: %clang -### -target x86_64-unknown-netbsd -S -O1 %s 2>&1 | \
// RUN: FileCheck --check-prefix=KEEP-NONE %s
diff --git a/clang/test/Driver/fsanitize.c b/clang/test/Driver/fsanitize.c
index d16ed4251f7b1c..e7bc013c866a37 100644
--- a/clang/test/Driver/fsanitize.c
+++ b/clang/test/Driver/fsanitize.c
@@ -716,10 +716,6 @@
// RUN: %clang --target=powerpc64le-unknown-linux-gnu -fsanitize=memory %s -### 2>&1 | FileCheck %s -check-prefix=CHECK-SANM
// CHECK-SANM: "-fsanitize=memory"
-// RUN: %clang --target=aarch64-unknown-cloudabi -fsanitize=safe-stack %s -### 2>&1 | FileCheck %s -check-prefix=SAFESTACK-CLOUDABI
-// RUN: %clang --target=x86_64-unknown-cloudabi -fsanitize=safe-stack %s -### 2>&1 | FileCheck %s -check-prefix=SAFESTACK-CLOUDABI
-// SAFESTACK-CLOUDABI: "-fsanitize=safe-stack"
-
// RUN: %clang --target=x86_64--freebsd -fsanitize=kernel-address %s -### 2>&1 | FileCheck %s -check-prefix=KERNEL-ADDRESS-FREEBSD
// RUN: %clang --target=aarch64--freebsd -fsanitize=kernel-address %s -### 2>&1 | FileCheck %s -check-prefix=KERNEL-ADDRESS-FREEBSD
// KERNEL-ADDRESS-FREEBSD: "-fsanitize=kernel-address"
diff --git a/clang/test/Frontend/gnu-mcount.c b/clang/test/Frontend/gnu-mcount.c
index 7e6e797292f631..e54983ca356ad6 100644
--- a/clang/test/Frontend/gnu-mcount.c
+++ b/clang/test/Frontend/gnu-mcount.c
@@ -32,10 +32,6 @@
// RUN: %clang -target armv7-unknown-rtems-gnueabihf -meabi gnu -pg -S -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,MCOUNT
// RUN: %clang -target aarch64-unknown-rtems-gnueabihf -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefixes=CHECK,MCOUNT
// RUN: %clang -target aarch64-unknown-rtems-gnueabihf -meabi gnu -pg -S -emit-llvm -o - %s | FileCheck %s -check-prefixes=CHECK,MCOUNT
-// RUN: %clang -target armv7-unknown-cloudabi-gnueabihf -pg -S -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,MCOUNT
-// RUN: %clang -target armv7-unknown-cloudabi-gnueabihf -meabi gnu -pg -S -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,MCOUNT
-// RUN: %clang -target aarch64-unknown-cloudabi-gnueabihf -pg -S -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,MCOUNT
-// RUN: %clang -target aarch64-unknown-cloudabi-gnueabihf -meabi gnu -pg -S -emit-llvm -o - %s | FileCheck %s --check-prefixes=CHECK,MCOUNT
int f() {
return 0;
diff --git a/clang/test/Preprocessor/init-arm.c b/clang/test/Preprocessor/init-arm.c
index 012e121ef753e3..6e3acacc5c3a52 100644
--- a/clang/test/Preprocessor/init-arm.c
+++ b/clang/test/Preprocessor/init-arm.c
@@ -1177,11 +1177,6 @@
// ARMEABIHARDFP:#define __arm 1
// ARMEABIHARDFP:#define __arm__ 1
-// RUN: %clang_cc1 -E -dM -ffreestanding -triple=armv6-unknown-cloudabi-eabihf < /dev/null | FileCheck -match-full-lines -check-prefix ARMV6-CLOUDABI %s
-//
-// ARMV6-CLOUDABI:#define __CloudABI__ 1
-// ARMV6-CLOUDABI:#define __arm__ 1
-
// RUN: %clang -E -dM -ffreestanding -target arm-netbsd-eabi %s -o - | FileCheck -match-full-lines -check-prefix ARM-NETBSD %s
// ARM-NETBSD-NOT:#define _LP64
diff --git a/clang/test/Preprocessor/init-x86.c b/clang/test/Preprocessor/init-x86.c
index eb7759c0da119a..58be9b71657174 100644
--- a/clang/test/Preprocessor/init-x86.c
+++ b/clang/test/Preprocessor/init-x86.c
@@ -1001,312 +1001,6 @@
// X32:#define __x86_64 1
// X32:#define __x86_64__ 1
-// RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=x86_64-unknown-cloudabi < /dev/null | FileCheck -match-full-lines -check-prefix X86_64-CLOUDABI %s
-//
-// X86_64-CLOUDABI:#define _LP64 1
-// X86_64-CLOUDABI:#define __ATOMIC_ACQUIRE 2
-// X86_64-CLOUDABI:#define __ATOMIC_ACQ_REL 4
-// X86_64-CLOUDABI:#define __ATOMIC_CONSUME 1
-// X86_64-CLOUDABI:#define __ATOMIC_RELAXED 0
-// X86_64-CLOUDABI:#define __ATOMIC_RELEASE 3
-// X86_64-CLOUDABI:#define __ATOMIC_SEQ_CST 5
-// X86_64-CLOUDABI:#define __BIGGEST_ALIGNMENT__ 16
-// X86_64-CLOUDABI:#define __BYTE_ORDER__ __ORDER_LITTLE_ENDIAN__
-// X86_64-CLOUDABI:#define __CHAR16_TYPE__ unsigned short
-// X86_64-CLOUDABI:#define __CHAR32_TYPE__ unsigned int
-// X86_64-CLOUDABI:#define __CHAR_BIT__ 8
-// X86_64-CLOUDABI:#define __CONSTANT_CFSTRINGS__ 1
-// X86_64-CLOUDABI:#define __CloudABI__ 1
-// X86_64-CLOUDABI:#define __DBL_DECIMAL_DIG__ 17
-// X86_64-CLOUDABI:#define __DBL_DENORM_MIN__ 4.9406564584124654e-324
-// X86_64-CLOUDABI:#define __DBL_DIG__ 15
-// X86_64-CLOUDABI:#define __DBL_EPSILON__ 2.2204460492503131e-16
-// X86_64-CLOUDABI:#define __DBL_HAS_DENORM__ 1
-// X86_64-CLOUDABI:#define __DBL_HAS_INFINITY__ 1
-// X86_64-CLOUDABI:#define __DBL_HAS_QUIET_NAN__ 1
-// X86_64-CLOUDABI:#define __DBL_MANT_DIG__ 53
-// X86_64-CLOUDABI:#define __DBL_MAX_10_EXP__ 308
-// X86_64-CLOUDABI:#define __DBL_MAX_EXP__ 1024
-// X86_64-CLOUDABI:#define __DBL_MAX__ 1.7976931348623157e+308
-// X86_64-CLOUDABI:#define __DBL_MIN_10_EXP__ (-307)
-// X86_64-CLOUDABI:#define __DBL_MIN_EXP__ (-1021)
-// X86_64-CLOUDABI:#define __DBL_MIN__ 2.2250738585072014e-308
-// X86_64-CLOUDABI:#define __DECIMAL_DIG__ __LDBL_DECIMAL_DIG__
-// X86_64-CLOUDABI:#define __ELF__ 1
-// X86_64-CLOUDABI:#define __FINITE_MATH_ONLY__ 0
-// X86_64-CLOUDABI:#define __FLT_DECIMAL_DIG__ 9
-// X86_64-CLOUDABI:#define __FLT_DENORM_MIN__ 1.40129846e-45F
-// X86_64-CLOUDABI:#define __FLT_DIG__ 6
-// X86_64-CLOUDABI:#define __FLT_EPSILON__ 1.19209290e-7F
-// X86_64-CLOUDABI:#define __FLT_HAS_DENORM__ 1
-// X86_64-CLOUDABI:#define __FLT_HAS_INFINITY__ 1
-// X86_64-CLOUDABI:#define __FLT_HAS_QUIET_NAN__ 1
-// X86_64-CLOUDABI:#define __FLT_MANT_DIG__ 24
-// X86_64-CLOUDABI:#define __FLT_MAX_10_EXP__ 38
-// X86_64-CLOUDABI:#define __FLT_MAX_EXP__ 128
-// X86_64-CLOUDABI:#define __FLT_MAX__ 3.40282347e+38F
-// X86_64-CLOUDABI:#define __FLT_MIN_10_EXP__ (-37)
-// X86_64-CLOUDABI:#define __FLT_MIN_EXP__ (-125)
-// X86_64-CLOUDABI:#define __FLT_MIN__ 1.17549435e-38F
-// X86_64-CLOUDABI:#define __FLT_RADIX__ 2
-// X86_64-CLOUDABI:#define __GCC_ATOMIC_BOOL_LOCK_FREE 2
-// X86_64-CLOUDABI:#define __GCC_ATOMIC_CHAR16_T_LOCK_FREE 2
-// X86_64-CLOUDABI:#define __GCC_ATOMIC_CHAR32_T_LOCK_FREE 2
-// X86_64-CLOUDABI:#define __GCC_ATOMIC_CHAR_LOCK_FREE 2
-// X86_64-CLOUDABI:#define __GCC_ATOMIC_INT_LOCK_FREE 2
-// X86_64-CLOUDABI:#define __GCC_ATOMIC_LLONG_LOCK_FREE 2
-// X86_64-CLOUDABI:#define __GCC_ATOMIC_LONG_LOCK_FREE 2
-// X86_64-CLOUDABI:#define __GCC_ATOMIC_POINTER_LOCK_FREE 2
-// X86_64-CLOUDABI:#define __GCC_ATOMIC_SHORT_LOCK_FREE 2
-// X86_64-CLOUDABI:#define __GCC_ATOMIC_TEST_AND_SET_TRUEVAL 1
-// X86_64-CLOUDABI:#define __GCC_ATOMIC_WCHAR_T_LOCK_FREE 2
-// X86_64-CLOUDABI:#define __GNUC_MINOR__ 2
-// X86_64-CLOUDABI:#define __GNUC_PATCHLEVEL__ 1
-// X86_64-CLOUDABI:#define __GNUC_STDC_INLINE__ 1
-// X86_64-CLOUDABI:#define __GNUC__ 4
-// X86_64-CLOUDABI:#define __GXX_ABI_VERSION 1002
-// X86_64-CLOUDABI:#define __INT16_C_SUFFIX__
-// X86_64-CLOUDABI:#define __INT16_FMTd__ "hd"
-// X86_64-CLOUDABI:#define __INT16_FMTi__ "hi"
-// X86_64-CLOUDABI:#define __INT16_MAX__ 32767
-// X86_64-CLOUDABI:#define __INT16_TYPE__ short
-// X86_64-CLOUDABI:#define __INT32_C_SUFFIX__
-// X86_64-CLOUDABI:#define __INT32_FMTd__ "d"
-// X86_64-CLOUDABI:#define __INT32_FMTi__ "i"
-// X86_64-CLOUDABI:#define __INT32_MAX__ 2147483647
-// X86_64-CLOUDABI:#define __INT32_TYPE__ int
-// X86_64-CLOUDABI:#define __INT64_C_SUFFIX__ L
-// X86_64-CLOUDABI:#define __INT64_FMTd__ "ld"
-// X86_64-CLOUDABI:#define __INT64_FMTi__ "li"
-// X86_64-CLOUDABI:#define __INT64_MAX__ 9223372036854775807L
-// X86_64-CLOUDABI:#define __INT64_TYPE__ long int
-// X86_64-CLOUDABI:#define __INT8_C_SUFFIX__
-// X86_64-CLOUDABI:#define __INT8_FMTd__ "hhd"
-// X86_64-CLOUDABI:#define __INT8_FMTi__ "hhi"
-// X86_64-CLOUDABI:#define __INT8_MAX__ 127
-// X86_64-CLOUDABI:#define __INT8_TYPE__ signed char
-// X86_64-CLOUDABI:#define __INTMAX_C_SUFFIX__ L
-// X86_64-CLOUDABI:#define __INTMAX_FMTd__ "ld"
-// X86_64-CLOUDABI:#define __INTMAX_FMTi__ "li"
-// X86_64-CLOUDABI:#define __INTMAX_MAX__ 9223372036854775807L
-// X86_64-CLOUDABI:#define __INTMAX_TYPE__ long int
-// X86_64-CLOUDABI:#define __INTMAX_WIDTH__ 64
-// X86_64-CLOUDABI:#define __INTPTR_FMTd__ "ld"
-// X86_64-CLOUDABI:#define __INTPTR_FMTi__ "li"
-// X86_64-CLOUDABI:#define __INTPTR_MAX__ 9223372036854775807L
-// X86_64-CLOUDABI:#define __INTPTR_TYPE__ long int
-// X86_64-CLOUDABI:#define __INTPTR_WIDTH__ 64
-// X86_64-CLOUDABI:#define __INT_FAST16_FMTd__ "hd"
-// X86_64-CLOUDABI:#define __INT_FAST16_FMTi__ "hi"
-// X86_64-CLOUDABI:#define __INT_FAST16_MAX__ 32767
-// X86_64-CLOUDABI:#define __INT_FAST16_TYPE__ short
-// X86_64-CLOUDABI:#define __INT_FAST32_FMTd__ "d"
-// X86_64-CLOUDABI:#define __INT_FAST32_FMTi__ "i"
-// X86_64-CLOUDABI:#define __INT_FAST32_MAX__ 2147483647
-// X86_64-CLOUDABI:#define __INT_FAST32_TYPE__ int
-// X86_64-CLOUDABI:#define __INT_FAST64_FMTd__ "ld"
-// X86_64-CLOUDABI:#define __INT_FAST64_FMTi__ "li"
-// X86_64-CLOUDABI:#define __INT_FAST64_MAX__ 9223372036854775807L
-// X86_64-CLOUDABI:#define __INT_FAST64_TYPE__ long int
-// X86_64-CLOUDABI:#define __INT_FAST8_FMTd__ "hhd"
-// X86_64-CLOUDABI:#define __INT_FAST8_FMTi__ "hhi"
-// X86_64-CLOUDABI:#define __INT_FAST8_MAX__ 127
-// X86_64-CLOUDABI:#define __INT_FAST8_TYPE__ signed char
-// X86_64-CLOUDABI:#define __INT_LEAST16_FMTd__ "hd"
-// X86_64-CLOUDABI:#define __INT_LEAST16_FMTi__ "hi"
-// X86_64-CLOUDABI:#define __INT_LEAST16_MAX__ 32767
-// X86_64-CLOUDABI:#define __INT_LEAST16_TYPE__ short
-// X86_64-CLOUDABI:#define __INT_LEAST32_FMTd__ "d"
-// X86_64-CLOUDABI:#define __INT_LEAST32_FMTi__ "i"
-// X86_64-CLOUDABI:#define __INT_LEAST32_MAX__ 2147483647
-// X86_64-CLOUDABI:#define __INT_LEAST32_TYPE__ int
-// X86_64-CLOUDABI:#define __INT_LEAST64_FMTd__ "ld"
-// X86_64-CLOUDABI:#define __INT_LEAST64_FMTi__ "li"
-// X86_64-CLOUDABI:#define __INT_LEAST64_MAX__ 9223372036854775807L
-// X86_64-CLOUDABI:#define __INT_LEAST64_TYPE__ long int
-// X86_64-CLOUDABI:#define __INT_LEAST8_FMTd__ "hhd"
-// X86_64-CLOUDABI:#define __INT_LEAST8_FMTi__ "hhi"
-// X86_64-CLOUDABI:#define __INT_LEAST8_MAX__ 127
-// X86_64-CLOUDABI:#define __INT_LEAST8_TYPE__ signed char
-// X86_64-CLOUDABI:#define __INT_MAX__ 2147483647
-// X86_64-CLOUDABI:#define __LDBL_DECIMAL_DIG__ 21
-// X86_64-CLOUDABI:#define __LDBL_DENORM_MIN__ 3.64519953188247460253e-4951L
-// X86_64-CLOUDABI:#define __LDBL_DIG__ 18
-// X86_64-CLOUDABI:#define __LDBL_EPSILON__ 1.08420217248550443401e-19L
-// X86_64-CLOUDABI:#define __LDBL_HAS_DENORM__ 1
-// X86_64-CLOUDABI:#define __LDBL_HAS_INFINITY__ 1
-// X86_64-CLOUDABI:#define __LDBL_HAS_QUIET_NAN__ 1
-// X86_64-CLOUDABI:#define __LDBL_MANT_DIG__ 64
-// X86_64-CLOUDABI:#define __LDBL_MAX_10_EXP__ 4932
-// X86_64-CLOUDABI:#define __LDBL_MAX_EXP__ 16384
-// X86_64-CLOUDABI:#define __LDBL_MAX__ 1.18973149535723176502e+4932L
-// X86_64-CLOUDABI:#define __LDBL_MIN_10_EXP__ (-4931)
-// X86_64-CLOUDABI:#define __LDBL_MIN_EXP__ (-16381)
-// X86_64-CLOUDABI:#define __LDBL_MIN__ 3.36210314311209350626e-4932L
-// X86_64-CLOUDABI:#define __LITTLE_ENDIAN__ 1
-// X86_64-CLOUDABI:#define __LONG_LONG_MAX__ 9223372036854775807LL
-// X86_64-CLOUDABI:#define __LONG_MAX__ 9223372036854775807L
-// X86_64-CLOUDABI:#define __LP64__ 1
-// X86_64-CLOUDABI:#define __MMX__ 1
-// X86_64-CLOUDABI:#define __NO_INLINE__ 1
-// X86_64-CLOUDABI:#define __NO_MATH_INLINES 1
-// X86_64-CLOUDABI:#define __ORDER_BIG_ENDIAN__ 4321
-// X86_64-CLOUDABI:#define __ORDER_LITTLE_ENDIAN__ 1234
-// X86_64-CLOUDABI:#define __ORDER_PDP_ENDIAN__ 3412
-// X86_64-CLOUDABI:#define __POINTER_WIDTH__ 64
-// X86_64-CLOUDABI:#define __PRAGMA_REDEFINE_EXTNAME 1
-// X86_64-CLOUDABI:#define __PTRDIFF_FMTd__ "ld"
-// X86_64-CLOUDABI:#define __PTRDIFF_FMTi__ "li"
-// X86_64-CLOUDABI:#define __PTRDIFF_MAX__ 9223372036854775807L
-// X86_64-CLOUDABI:#define __PTRDIFF_TYPE__ long int
-// X86_64-CLOUDABI:#define __PTRDIFF_WIDTH__ 64
-// X86_64-CLOUDABI:#define __REGISTER_PREFIX__
-// X86_64-CLOUDABI:#define __SCHAR_MAX__ 127
-// X86_64-CLOUDABI:#define __SHRT_MAX__ 32767
-// X86_64-CLOUDABI:#define __SIG_ATOMIC_MAX__ 2147483647
-// X86_64-CLOUDABI:#define __SIG_ATOMIC_WIDTH__ 32
-// X86_64-CLOUDABI:#define __SIZEOF_DOUBLE__ 8
-// X86_64-CLOUDABI:#define __SIZEOF_FLOAT__ 4
-// X86_64-CLOUDABI:#define __SIZEOF_INT128__ 16
-// X86_64-CLOUDABI:#define __SIZEOF_INT__ 4
-// X86_64-CLOUDABI:#define __SIZEOF_LONG_DOUBLE__ 16
-// X86_64-CLOUDABI:#define __SIZEOF_LONG_LONG__ 8
-// X86_64-CLOUDABI:#define __SIZEOF_LONG__ 8
-// X86_64-CLOUDABI:#define __SIZEOF_POINTER__ 8
-// X86_64-CLOUDABI:#define __SIZEOF_PTRDIFF_T__ 8
-// X86_64-CLOUDABI:#define __SIZEOF_SHORT__ 2
-// X86_64-CLOUDABI:#define __SIZEOF_SIZE_T__ 8
-// X86_64-CLOUDABI:#define __SIZEOF_WCHAR_T__ 4
-// X86_64-CLOUDABI:#define __SIZEOF_WINT_T__ 4
-// X86_64-CLOUDABI:#define __SIZE_FMTX__ "lX"
-// X86_64-CLOUDABI:#define __SIZE_FMTo__ "lo"
-// X86_64-CLOUDABI:#define __SIZE_FMTu__ "lu"
-// X86_64-CLOUDABI:#define __SIZE_FMTx__ "lx"
-// X86_64-CLOUDABI:#define __SIZE_MAX__ 18446744073709551615UL
-// X86_64-CLOUDABI:#define __SIZE_TYPE__ long unsigned int
-// X86_64-CLOUDABI:#define __SIZE_WIDTH__ 64
-// X86_64-CLOUDABI:#define __SSE2_MATH__ 1
-// X86_64-CLOUDABI:#define __SSE2__ 1
-// X86_64-CLOUDABI:#define __SSE_MATH__ 1
-// X86_64-CLOUDABI:#define __SSE__ 1
-// X86_64-CLOUDABI:#define __STDC_HOSTED__ 0
-// X86_64-CLOUDABI:#define __STDC_ISO_10646__ 201206L
-// X86_64-CLOUDABI:#define __STDC_UTF_16__ 1
-// X86_64-CLOUDABI:#define __STDC_UTF_32__ 1
-// X86_64-CLOUDABI:#define __STDC_VERSION__ 201710L
-// X86_64-CLOUDABI:#define __STDC__ 1
-// X86_64-CLOUDABI:#define __UINT16_C_SUFFIX__
-// X86_64-CLOUDABI:#define __UINT16_FMTX__ "hX"
-// X86_64-CLOUDABI:#define __UINT16_FMTo__ "ho"
-// X86_64-CLOUDABI:#define __UINT16_FMTu__ "hu"
-// X86_64-CLOUDABI:#define __UINT16_FMTx__ "hx"
-// X86_64-CLOUDABI:#define __UINT16_MAX__ 65535
-// X86_64-CLOUDABI:#define __UINT16_TYPE__ unsigned short
-// X86_64-CLOUDABI:#define __UINT32_C_SUFFIX__ U
-// X86_64-CLOUDABI:#define __UINT32_FMTX__ "X"
-// X86_64-CLOUDABI:#define __UINT32_FMTo__ "o"
-// X86_64-CLOUDABI:#define __UINT32_FMTu__ "u"
-// X86_64-CLOUDABI:#define __UINT32_FMTx__ "x"
-// X86_64-CLOUDABI:#define __UINT32_MAX__ 4294967295U
-// X86_64-CLOUDABI:#define __UINT32_TYPE__ unsigned int
-// X86_64-CLOUDABI:#define __UINT64_C_SUFFIX__ UL
-// X86_64-CLOUDABI:#define __UINT64_FMTX__ "lX"
-// X86_64-CLOUDABI:#define __UINT64_FMTo__ "lo"
-// X86_64-CLOUDABI:#define __UINT64_FMTu__ "lu"
-// X86_64-CLOUDABI:#define __UINT64_FMTx__ "lx"
-// X86_64-CLOUDABI:#define __UINT64_MAX__ 18446744073709551615UL
-// X86_64-CLOUDABI:#define __UINT64_TYPE__ long unsigned int
-// X86_64-CLOUDABI:#define __UINT8_C_SUFFIX__
-// X86_64-CLOUDABI:#define __UINT8_FMTX__ "hhX"
-// X86_64-CLOUDABI:#define __UINT8_FMTo__ "hho"
-// X86_64-CLOUDABI:#define __UINT8_FMTu__ "hhu"
-// X86_64-CLOUDABI:#define __UINT8_FMTx__ "hhx"
-// X86_64-CLOUDABI:#define __UINT8_MAX__ 255
-// X86_64-CLOUDABI:#define __UINT8_TYPE__ unsigned char
-// X86_64-CLOUDABI:#define __UINTMAX_C_SUFFIX__ UL
-// X86_64-CLOUDABI:#define __UINTMAX_FMTX__ "lX"
-// X86_64-CLOUDABI:#define __UINTMAX_FMTo__ "lo"
-// X86_64-CLOUDABI:#define __UINTMAX_FMTu__ "lu"
-// X86_64-CLOUDABI:#define __UINTMAX_FMTx__ "lx"
-// X86_64-CLOUDABI:#define __UINTMAX_MAX__ 18446744073709551615UL
-// X86_64-CLOUDABI:#define __UINTMAX_TYPE__ long unsigned int
-// X86_64-CLOUDABI:#define __UINTMAX_WIDTH__ 64
-// X86_64-CLOUDABI:#define __UINTPTR_FMTX__ "lX"
-// X86_64-CLOUDABI:#define __UINTPTR_FMTo__ "lo"
-// X86_64-CLOUDABI:#define __UINTPTR_FMTu__ "lu"
-// X86_64-CLOUDABI:#define __UINTPTR_FMTx__ "lx"
-// X86_64-CLOUDABI:#define __UINTPTR_MAX__ 18446744073709551615UL
-// X86_64-CLOUDABI:#define __UINTPTR_TYPE__ long unsigned int
-// X86_64-CLOUDABI:#define __UINTPTR_WIDTH__ 64
-// X86_64-CLOUDABI:#define __UINT_FAST16_FMTX__ "hX"
-// X86_64-CLOUDABI:#define __UINT_FAST16_FMTo__ "ho"
-// X86_64-CLOUDABI:#define __UINT_FAST16_FMTu__ "hu"
-// X86_64-CLOUDABI:#define __UINT_FAST16_FMTx__ "hx"
-// X86_64-CLOUDABI:#define __UINT_FAST16_MAX__ 65535
-// X86_64-CLOUDABI:#define __UINT_FAST16_TYPE__ unsigned short
-// X86_64-CLOUDABI:#define __UINT_FAST32_FMTX__ "X"
-// X86_64-CLOUDABI:#define __UINT_FAST32_FMTo__ "o"
-// X86_64-CLOUDABI:#define __UINT_FAST32_FMTu__ "u"
-// X86_64-CLOUDABI:#define __UINT_FAST32_FMTx__ "x"
-// X86_64-CLOUDABI:#define __UINT_FAST32_MAX__ 4294967295U
-// X86_64-CLOUDABI:#define __UINT_FAST32_TYPE__ unsigned int
-// X86_64-CLOUDABI:#define __UINT_FAST64_FMTX__ "lX"
-// X86_64-CLOUDABI:#define __UINT_FAST64_FMTo__ "lo"
-// X86_64-CLOUDABI:#define __UINT_FAST64_FMTu__ "lu"
-// X86_64-CLOUDABI:#define __UINT_FAST64_FMTx__ "lx"
-// X86_64-CLOUDABI:#define __UINT_FAST64_MAX__ 18446744073709551615UL
-// X86_64-CLOUDABI:#define __UINT_FAST64_TYPE__ long unsigned int
-// X86_64-CLOUDABI:#define __UINT_FAST8_FMTX__ "hhX"
-// X86_64-CLOUDABI:#define __UINT_FAST8_FMTo__ "hho"
-// X86_64-CLOUDABI:#define __UINT_FAST8_FMTu__ "hhu"
-// X86_64-CLOUDABI:#define __UINT_FAST8_FMTx__ "hhx"
-// X86_64-CLOUDABI:#define __UINT_FAST8_MAX__ 255
-// X86_64-CLOUDABI:#define __UINT_FAST8_TYPE__ unsigned char
-// X86_64-CLOUDABI:#define __UINT_LEAST16_FMTX__ "hX"
-// X86_64-CLOUDABI:#define __UINT_LEAST16_FMTo__ "ho"
-// X86_64-CLOUDABI:#define __UINT_LEAST16_FMTu__ "hu"
-// X86_64-CLOUDABI:#define __UINT_LEAST16_FMTx__ "hx"
-// X86_64-CLOUDABI:#define __UINT_LEAST16_MAX__ 65535
-// X86_64-CLOUDABI:#define __UINT_LEAST16_TYPE__ unsigned short
-// X86_64-CLOUDABI:#define __UINT_LEAST32_FMTX__ "X"
-// X86_64-CLOUDABI:#define __UINT_LEAST32_FMTo__ "o"
-// X86_64-CLOUDABI:#define __UINT_LEAST32_FMTu__ "u"
-// X86_64-CLOUDABI:#define __UINT_LEAST32_FMTx__ "x"
-// X86_64-CLOUDABI:#define __UINT_LEAST32_MAX__ 4294967295U
-// X86_64-CLOUDABI:#define __UINT_LEAST32_TYPE__ unsigned int
-// X86_64-CLOUDABI:#define __UINT_LEAST64_FMTX__ "lX"
-// X86_64-CLOUDABI:#define __UINT_LEAST64_FMTo__ "lo"
-// X86_64-CLOUDABI:#define __UINT_LEAST64_FMTu__ "lu"
-// X86_64-CLOUDABI:#define __UINT_LEAST64_FMTx__ "lx"
-// X86_64-CLOUDABI:#define __UINT_LEAST64_MAX__ 18446744073709551615UL
-// X86_64-CLOUDABI:#define __UINT_LEAST64_TYPE__ long unsigned int
-// X86_64-CLOUDABI:#define __UINT_LEAST8_FMTX__ "hhX"
-// X86_64-CLOUDABI:#define __UINT_LEAST8_FMTo__ "hho"
-// X86_64-CLOUDABI:#define __UINT_LEAST8_FMTu__ "hhu"
-// X86_64-CLOUDABI:#define __UINT_LEAST8_FMTx__ "hhx"
-// X86_64-CLOUDABI:#define __UINT_LEAST8_MAX__ 255
-// X86_64-CLOUDABI:#define __UINT_LEAST8_TYPE__ unsigned char
-// X86_64-CLOUDABI:#define __USER_LABEL_PREFIX__
-// X86_64-CLOUDABI:#define __VERSION__ "{{.*}}Clang{{.*}}
-// X86_64-CLOUDABI:#define __WCHAR_MAX__ 2147483647
-// X86_64-CLOUDABI:#define __WCHAR_TYPE__ int
-// X86_64-CLOUDABI:#define __WCHAR_WIDTH__ 32
-// X86_64-CLOUDABI:#define __WINT_MAX__ 2147483647
-// X86_64-CLOUDABI:#define __WINT_TYPE__ int
-// X86_64-CLOUDABI:#define __WINT_WIDTH__ 32
-// X86_64-CLOUDABI:#define __amd64 1
-// X86_64-CLOUDABI:#define __amd64__ 1
-// X86_64-CLOUDABI:#define __clang__ 1
-// X86_64-CLOUDABI:#define __clang_literal_encoding__ {{.*}}
-// X86_64-CLOUDABI:#define __clang_major__ {{.*}}
-// X86_64-CLOUDABI:#define __clang_minor__ {{.*}}
-// X86_64-CLOUDABI:#define __clang_patchlevel__ {{.*}}
-// X86_64-CLOUDABI:#define __clang_version__ {{.*}}
-// X86_64-CLOUDABI:#define __clang_wide_literal_encoding__ {{.*}}
-// X86_64-CLOUDABI:#define __llvm__ 1
-// X86_64-CLOUDABI:#define __x86_64 1
-// X86_64-CLOUDABI:#define __x86_64__ 1
-
// RUN: %clang_cc1 -E -dM -ffreestanding -fgnuc-version=4.2.1 -triple=x86_64-pc-linux-gnu < /dev/null | FileCheck -match-full-lines -check-prefix X86_64-LINUX %s
//
// X86_64-LINUX:#define _LP64 1
diff --git a/clang/test/Preprocessor/predefined-macros-no-warnings.c b/clang/test/Preprocessor/predefined-macros-no-warnings.c
index e8bae2a7bd3082..56573af6fc7ba8 100644
--- a/clang/test/Preprocessor/predefined-macros-no-warnings.c
+++ b/clang/test/Preprocessor/predefined-macros-no-warnings.c
@@ -10,7 +10,6 @@
// 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
@@ -26,7 +25,6 @@
// 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
@@ -135,7 +133,6 @@
// 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-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
@@ -156,7 +153,6 @@
// 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-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
diff --git a/llvm/include/llvm/MC/MCELFObjectWriter.h b/llvm/include/llvm/MC/MCELFObjectWriter.h
index bc6a62f8e57b11..d7c223cdcc07f8 100644
--- a/llvm/include/llvm/MC/MCELFObjectWriter.h
+++ b/llvm/include/llvm/MC/MCELFObjectWriter.h
@@ -71,8 +71,6 @@ class MCELFObjectTargetWriter : public MCObjectTargetWriter {
static uint8_t getOSABI(Triple::OSType OSType) {
switch (OSType) {
- case Triple::CloudABI:
- return ELF::ELFOSABI_CLOUDABI;
case Triple::HermitCore:
return ELF::ELFOSABI_STANDALONE;
case Triple::PS4:
diff --git a/llvm/include/llvm/TargetParser/Triple.h b/llvm/include/llvm/TargetParser/Triple.h
index 182e1c0ccbc2ad..fce3ab69d53379 100644
--- a/llvm/include/llvm/TargetParser/Triple.h
+++ b/llvm/include/llvm/TargetParser/Triple.h
@@ -184,7 +184,6 @@ class Triple {
enum OSType {
UnknownOS,
- CloudABI,
Darwin,
DragonFly,
FreeBSD,
diff --git a/llvm/lib/TargetParser/Triple.cpp b/llvm/lib/TargetParser/Triple.cpp
index 9fe1b1786d2d09..5eea4acd1c6b8d 100644
--- a/llvm/lib/TargetParser/Triple.cpp
+++ b/llvm/lib/TargetParser/Triple.cpp
@@ -208,7 +208,6 @@ StringRef Triple::getOSTypeName(OSType Kind) {
case AMDHSA: return "amdhsa";
case AMDPAL: return "amdpal";
case CUDA: return "cuda";
- case CloudABI: return "cloudabi";
case Darwin: return "darwin";
case DragonFly: return "dragonfly";
case DriverKit: return "driverkit";
@@ -570,7 +569,6 @@ static Triple::VendorType parseVendor(StringRef VendorName) {
static Triple::OSType parseOS(StringRef OSName) {
return StringSwitch<Triple::OSType>(OSName)
- .StartsWith("cloudabi", Triple::CloudABI)
.StartsWith("darwin", Triple::Darwin)
.StartsWith("dragonfly", Triple::DragonFly)
.StartsWith("freebsd", Triple::FreeBSD)
diff --git a/llvm/unittests/TargetParser/TripleTest.cpp b/llvm/unittests/TargetParser/TripleTest.cpp
index 59ec2e256ce926..ce1f1dc8eb68fa 100644
--- a/llvm/unittests/TargetParser/TripleTest.cpp
+++ b/llvm/unittests/TargetParser/TripleTest.cpp
@@ -319,12 +319,6 @@ TEST(TripleTest, ParsedIDs) {
EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
EXPECT_EQ(Triple::UnknownOS, T.getOS());
- T = Triple("x86_64-unknown-cloudabi");
- EXPECT_EQ(Triple::x86_64, T.getArch());
- EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
- EXPECT_EQ(Triple::CloudABI, T.getOS());
- EXPECT_EQ(Triple::UnknownEnvironment, T.getEnvironment());
-
T = Triple("x86_64-unknown-fuchsia");
EXPECT_EQ(Triple::x86_64, T.getArch());
EXPECT_EQ(Triple::UnknownVendor, T.getVendor());
diff --git a/llvm/utils/gn/secondary/clang/lib/Driver/BUILD.gn b/llvm/utils/gn/secondary/clang/lib/Driver/BUILD.gn
index de8d02c48141ae..8377847bbdac5d 100644
--- a/llvm/utils/gn/secondary/clang/lib/Driver/BUILD.gn
+++ b/llvm/utils/gn/secondary/clang/lib/Driver/BUILD.gn
@@ -63,7 +63,6 @@ static_library("Driver") {
"ToolChains/BareMetal.cpp",
"ToolChains/CSKYToolChain.cpp",
"ToolChains/Clang.cpp",
- "ToolChains/CloudABI.cpp",
"ToolChains/CommonArgs.cpp",
"ToolChains/CrossWindows.cpp",
"ToolChains/Cuda.cpp",
More information about the llvm-commits
mailing list