forked from OSchip/llvm-project
Replace a bunch of duplicate conditions with the call from types::.
llvm-svn: 254986
This commit is contained in:
parent
b0a44f70e3
commit
c1984075d8
|
@ -215,13 +215,9 @@ static void AddLinkerInputs(const ToolChain &TC, const InputInfoList &Inputs,
|
|||
Args.AddAllArgValues(CmdArgs, options::OPT_Zlinker_input);
|
||||
|
||||
for (const auto &II : Inputs) {
|
||||
if (!TC.HasNativeLLVMSupport()) {
|
||||
if (!TC.HasNativeLLVMSupport() && types::isLLVMIR(II.getType()))
|
||||
// Don't try to pass LLVM inputs unless we have native support.
|
||||
if (II.getType() == types::TY_LLVM_IR ||
|
||||
II.getType() == types::TY_LTO_IR ||
|
||||
II.getType() == types::TY_LLVM_BC || II.getType() == types::TY_LTO_BC)
|
||||
D.Diag(diag::err_drv_no_linker_llvm_support) << TC.getTripleString();
|
||||
}
|
||||
D.Diag(diag::err_drv_no_linker_llvm_support) << TC.getTripleString();
|
||||
|
||||
// Add filenames immediately.
|
||||
if (II.isFilename()) {
|
||||
|
@ -5975,8 +5971,7 @@ void gcc::Common::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
// inputs into '-Wl,' options?
|
||||
for (const auto &II : Inputs) {
|
||||
// Don't try to pass LLVM or AST inputs to a generic gcc.
|
||||
if (II.getType() == types::TY_LLVM_IR || II.getType() == types::TY_LTO_IR ||
|
||||
II.getType() == types::TY_LLVM_BC || II.getType() == types::TY_LTO_BC)
|
||||
if (types::isLLVMIR(II.getType()))
|
||||
D.Diag(diag::err_drv_no_linker_llvm_support)
|
||||
<< getToolChain().getTripleString();
|
||||
else if (II.getType() == types::TY_AST)
|
||||
|
@ -6094,8 +6089,7 @@ void hexagon::Assembler::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
// inputs into '-Wl,' options?
|
||||
for (const auto &II : Inputs) {
|
||||
// Don't try to pass LLVM or AST inputs to a generic gcc.
|
||||
if (II.getType() == types::TY_LLVM_IR || II.getType() == types::TY_LTO_IR ||
|
||||
II.getType() == types::TY_LLVM_BC || II.getType() == types::TY_LTO_BC)
|
||||
if (types::isLLVMIR(II.getType()))
|
||||
D.Diag(clang::diag::err_drv_no_linker_llvm_support)
|
||||
<< getToolChain().getTripleString();
|
||||
else if (II.getType() == types::TY_AST)
|
||||
|
|
Loading…
Reference in New Issue