mirror of https://github.com/microsoft/clang.git
Remove -cc1 option "-backend-option".
It means the same thing as -mllvm; there isn't any reason to have two options which do the same thing. Differential Revision: https://reviews.llvm.org/D45109 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@329965 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
5955ba83f7
commit
45e28963ee
|
@ -275,8 +275,6 @@ def split_stacks : Flag<["-"], "split-stacks">,
|
|||
HelpText<"Try to use a split stack if possible.">;
|
||||
def mno_zero_initialized_in_bss : Flag<["-"], "mno-zero-initialized-in-bss">,
|
||||
HelpText<"Do not put zero initialized data in the BSS">;
|
||||
def backend_option : Separate<["-"], "backend-option">,
|
||||
HelpText<"Additional arguments to forward to LLVM backend (during code gen)">;
|
||||
def mregparm : Separate<["-"], "mregparm">,
|
||||
HelpText<"Limit the number of registers available for integer arguments">;
|
||||
def munwind_tables : Flag<["-"], "munwind-tables">,
|
||||
|
|
|
@ -177,9 +177,6 @@ public:
|
|||
/// function instead of to trap instructions.
|
||||
std::string TrapFuncName;
|
||||
|
||||
/// A list of command-line options to forward to the LLVM backend.
|
||||
std::vector<std::string> BackendOptions;
|
||||
|
||||
/// A list of dependent libraries.
|
||||
std::vector<std::string> DependentLibraries;
|
||||
|
||||
|
|
|
@ -658,8 +658,6 @@ static void setCommandLineOpts(const CodeGenOptions &CodeGenOpts) {
|
|||
BackendArgs.push_back("-limit-float-precision");
|
||||
BackendArgs.push_back(CodeGenOpts.LimitFloatPrecision.c_str());
|
||||
}
|
||||
for (const std::string &BackendOption : CodeGenOpts.BackendOptions)
|
||||
BackendArgs.push_back(BackendOption.c_str());
|
||||
BackendArgs.push_back(nullptr);
|
||||
llvm::cl::ParseCommandLineOptions(BackendArgs.size() - 1,
|
||||
BackendArgs.data());
|
||||
|
|
|
@ -1350,7 +1350,7 @@ void Clang::AddARMTargetArgs(const llvm::Triple &Triple, const ArgList &Args,
|
|||
// Forward the -mglobal-merge option for explicit control over the pass.
|
||||
if (Arg *A = Args.getLastArg(options::OPT_mglobal_merge,
|
||||
options::OPT_mno_global_merge)) {
|
||||
CmdArgs.push_back("-backend-option");
|
||||
CmdArgs.push_back("-mllvm");
|
||||
if (A->getOption().matches(options::OPT_mno_global_merge))
|
||||
CmdArgs.push_back("-arm-global-merge=false");
|
||||
else
|
||||
|
@ -1464,21 +1464,21 @@ void Clang::AddAArch64TargetArgs(const ArgList &Args,
|
|||
|
||||
if (Arg *A = Args.getLastArg(options::OPT_mfix_cortex_a53_835769,
|
||||
options::OPT_mno_fix_cortex_a53_835769)) {
|
||||
CmdArgs.push_back("-backend-option");
|
||||
CmdArgs.push_back("-mllvm");
|
||||
if (A->getOption().matches(options::OPT_mfix_cortex_a53_835769))
|
||||
CmdArgs.push_back("-aarch64-fix-cortex-a53-835769=1");
|
||||
else
|
||||
CmdArgs.push_back("-aarch64-fix-cortex-a53-835769=0");
|
||||
} else if (Triple.isAndroid()) {
|
||||
// Enabled A53 errata (835769) workaround by default on android
|
||||
CmdArgs.push_back("-backend-option");
|
||||
CmdArgs.push_back("-mllvm");
|
||||
CmdArgs.push_back("-aarch64-fix-cortex-a53-835769=1");
|
||||
}
|
||||
|
||||
// Forward the -mglobal-merge option for explicit control over the pass.
|
||||
if (Arg *A = Args.getLastArg(options::OPT_mglobal_merge,
|
||||
options::OPT_mno_global_merge)) {
|
||||
CmdArgs.push_back("-backend-option");
|
||||
CmdArgs.push_back("-mllvm");
|
||||
if (A->getOption().matches(options::OPT_mno_global_merge))
|
||||
CmdArgs.push_back("-aarch64-enable-global-merge=false");
|
||||
else
|
||||
|
@ -3048,13 +3048,13 @@ static void RenderDebugOptions(const ToolChain &TC, const Driver &D,
|
|||
// Always enabled for SCE tuning.
|
||||
if (Args.hasArg(options::OPT_gdwarf_aranges) ||
|
||||
DebuggerTuning == llvm::DebuggerKind::SCE) {
|
||||
CmdArgs.push_back("-backend-option");
|
||||
CmdArgs.push_back("-mllvm");
|
||||
CmdArgs.push_back("-generate-arange-section");
|
||||
}
|
||||
|
||||
if (Args.hasFlag(options::OPT_fdebug_types_section,
|
||||
options::OPT_fno_debug_types_section, false)) {
|
||||
CmdArgs.push_back("-backend-option");
|
||||
CmdArgs.push_back("-mllvm");
|
||||
CmdArgs.push_back("-generate-type-units");
|
||||
}
|
||||
|
||||
|
@ -4073,17 +4073,17 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
if (Arg *A = Args.getLastArg(options::OPT_mrestrict_it,
|
||||
options::OPT_mno_restrict_it)) {
|
||||
if (A->getOption().matches(options::OPT_mrestrict_it)) {
|
||||
CmdArgs.push_back("-backend-option");
|
||||
CmdArgs.push_back("-mllvm");
|
||||
CmdArgs.push_back("-arm-restrict-it");
|
||||
} else {
|
||||
CmdArgs.push_back("-backend-option");
|
||||
CmdArgs.push_back("-mllvm");
|
||||
CmdArgs.push_back("-arm-no-restrict-it");
|
||||
}
|
||||
} else if (Triple.isOSWindows() &&
|
||||
(Triple.getArch() == llvm::Triple::arm ||
|
||||
Triple.getArch() == llvm::Triple::thumb)) {
|
||||
// Windows on ARM expects restricted IT blocks
|
||||
CmdArgs.push_back("-backend-option");
|
||||
CmdArgs.push_back("-mllvm");
|
||||
CmdArgs.push_back("-arm-restrict-it");
|
||||
}
|
||||
|
||||
|
|
|
@ -677,7 +677,6 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
|
|||
Opts.ReciprocalMath = Args.hasArg(OPT_freciprocal_math);
|
||||
Opts.NoTrappingMath = Args.hasArg(OPT_fno_trapping_math);
|
||||
Opts.NoZeroInitializedInBSS = Args.hasArg(OPT_mno_zero_initialized_in_bss);
|
||||
Opts.BackendOptions = Args.getAllArgValues(OPT_backend_option);
|
||||
Opts.NumRegisterParameters = getLastArgIntValue(Args, OPT_mregparm, 0, Diags);
|
||||
Opts.NoExecStack = Args.hasArg(OPT_mno_exec_stack);
|
||||
Opts.FatalWarnings = Args.hasArg(OPT_massembler_fatal_warnings);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
; Test to ensure -backend-options work when invoking the ThinLTO backend path.
|
||||
; Test to ensure -mllvm work when invoking the ThinLTO backend path.
|
||||
|
||||
; This test uses a non-existent backend option to test that backend options are
|
||||
; being parsed. While it's more important that the existing options are parsed
|
||||
|
@ -8,8 +8,8 @@
|
|||
|
||||
; RUN: %clang -flto=thin -c -o %t.o %s
|
||||
; RUN: llvm-lto -thinlto -o %t %t.o
|
||||
; RUN: not %clang_cc1 -x ir %t.o -fthinlto-index=%t.thinlto.bc -backend-option -nonexistent -emit-obj -o /dev/null 2>&1 | FileCheck %s -check-prefix=UNKNOWN
|
||||
; UNKNOWN: clang: Unknown command line argument '-nonexistent'
|
||||
; RUN: not %clang_cc1 -x ir %t.o -fthinlto-index=%t.thinlto.bc -mllvm -nonexistent -emit-obj -o /dev/null 2>&1 | FileCheck %s -check-prefix=UNKNOWN
|
||||
; UNKNOWN: clang (LLVM option parsing): Unknown command line argument '-nonexistent'
|
||||
|
||||
; RUN: not %clang_cc1 -flto=thinfoo 2>&1 | FileCheck %s -check-prefix=INVALID
|
||||
; INVALID: error: invalid value 'thinfoo' in '-flto=thinfoo'
|
||||
|
|
|
@ -31,7 +31,7 @@
|
|||
// Make sure NVVMReflect pass is enabled in NVPTX back-end.
|
||||
// RUN: %clang_cc1 -triple nvptx-unknown-cuda -fcuda-is-device \
|
||||
// RUN: -mlink-cuda-bitcode %t.bc -S -o /dev/null %s \
|
||||
// RUN: -backend-option -debug-pass=Structure 2>&1 \
|
||||
// RUN: -mllvm -debug-pass=Structure 2>&1 \
|
||||
// RUN: | FileCheck %s -check-prefix CHECK-REFLECT
|
||||
|
||||
#include "Inputs/cuda.h"
|
||||
|
|
|
@ -8,6 +8,6 @@
|
|||
// RUN: %clang -target aarch64-android-eabi %s -### 2>&1 \
|
||||
// RUN: | FileCheck --check-prefix=CHECK-YES %s
|
||||
|
||||
// CHECK-DEF-NOT: "-backend-option" "-aarch64-fix-cortex-a53-835769"
|
||||
// CHECK-YES: "-backend-option" "-aarch64-fix-cortex-a53-835769=1"
|
||||
// CHECK-NO: "-backend-option" "-aarch64-fix-cortex-a53-835769=0"
|
||||
// CHECK-DEF-NOT: "-mllvm" "-aarch64-fix-cortex-a53-835769"
|
||||
// CHECK-YES: "-mllvm" "-aarch64-fix-cortex-a53-835769=1"
|
||||
// CHECK-NO: "-mllvm" "-aarch64-fix-cortex-a53-835769=0"
|
||||
|
|
|
@ -26,7 +26,3 @@
|
|||
// RUN: %clang -target x86_64-apple-darwin10 \
|
||||
// RUN: -Werror -fno-builtin -fno-exceptions -fno-common -fno-rtti \
|
||||
// RUN: -mkernel -fsyntax-only %s
|
||||
|
||||
// RUN: %clang -c %s -target armv7k-apple-watchos -fapple-kext -mwatchos-version-min=1.0.0 -### 2>&1 \
|
||||
// RUN: | FileCheck %s --check-prefix=CHECK-WATCH
|
||||
// CHECK-WATCH-NOT: "-backend-option" "-arm-long-calls"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
// RUN: %clang -target armv8a-none-gnueabi -mrestrict-it -### %s 2> %t
|
||||
// RUN: FileCheck --check-prefix=CHECK-RESTRICTED < %t %s
|
||||
|
||||
// CHECK-RESTRICTED: "-backend-option" "-arm-restrict-it"
|
||||
// CHECK-RESTRICTED: "-mllvm" "-arm-restrict-it"
|
||||
|
||||
// RUN: %clang -target arm-none-gnueabi -mno-restrict-it -### %s 2> %t
|
||||
// RUN: FileCheck --check-prefix=CHECK-NO-RESTRICTED < %t %s
|
||||
|
@ -12,4 +12,4 @@
|
|||
// RUN: %clang -target armv8a-none-gnueabi -mno-restrict-it -### %s 2> %t
|
||||
// RUN: FileCheck --check-prefix=CHECK-NO-RESTRICTED < %t %s
|
||||
|
||||
// CHECK-NO-RESTRICTED: "-backend-option" "-arm-no-restrict-it"
|
||||
// CHECK-NO-RESTRICTED: "-mllvm" "-arm-no-restrict-it"
|
||||
|
|
|
@ -225,9 +225,9 @@
|
|||
//
|
||||
// GARANGE: -generate-arange-section
|
||||
//
|
||||
// FDTS: "-backend-option" "-generate-type-units"
|
||||
// FDTS: "-mllvm" "-generate-type-units"
|
||||
//
|
||||
// NOFDTS-NOT: "-backend-option" "-generate-type-units"
|
||||
// NOFDTS-NOT: "-mllvm" "-generate-type-units"
|
||||
//
|
||||
// CI: "-dwarf-column-info"
|
||||
//
|
||||
|
|
|
@ -10,8 +10,8 @@
|
|||
// RUN: -mno-global-merge
|
||||
// RUN: FileCheck --check-prefix=CHECK-NONE < %t %s
|
||||
|
||||
// CHECK-NGM-ARM: "-backend-option" "-arm-global-merge=false"
|
||||
// CHECK-NGM-AARCH64: "-backend-option" "-aarch64-enable-global-merge=false"
|
||||
// CHECK-NGM-ARM: "-mllvm" "-arm-global-merge=false"
|
||||
// CHECK-NGM-AARCH64: "-mllvm" "-aarch64-enable-global-merge=false"
|
||||
|
||||
// RUN: %clang -target armv7-unknown-unknown -### -fsyntax-only %s 2> %t \
|
||||
// RUN: -mglobal-merge
|
||||
|
@ -25,8 +25,8 @@
|
|||
// RUN: -mglobal-merge
|
||||
// RUN: FileCheck --check-prefix=CHECK-NONE < %t %s
|
||||
|
||||
// CHECK-GM-ARM: "-backend-option" "-arm-global-merge=true"
|
||||
// CHECK-GM-AARCH64: "-backend-option" "-aarch64-enable-global-merge=true"
|
||||
// CHECK-GM-ARM: "-mllvm" "-arm-global-merge=true"
|
||||
// CHECK-GM-AARCH64: "-mllvm" "-aarch64-enable-global-merge=true"
|
||||
|
||||
// RUN: %clang -target armv7-unknown-unknown -### -fsyntax-only %s 2> %t
|
||||
// RUN: FileCheck --check-prefix=CHECK-NONE < %t %s
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
// RUN: %clang -target armv7-windows -### %s 2>&1 | FileCheck %s
|
||||
|
||||
// CHECK: "-backend-option" "-arm-restrict-it"
|
||||
// CHECK: "-mllvm" "-arm-restrict-it"
|
||||
|
||||
|
|
|
@ -1,4 +0,0 @@
|
|||
// RUN: %clang_cc1 %s -emit-llvm -backend-option -time-passes -o - 2>&1 | FileCheck %s
|
||||
// RUN: %clang_cc1 %s -emit-llvm -backend-option -time-passes -o - -triple spir-unknown-unknown 2>&1 | FileCheck %s
|
||||
// CHECK: Pass execution timing report
|
||||
|
Loading…
Reference in New Issue