summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/ToolChains/Clang.cpp
diff options
context:
space:
mode:
authorBob Haarman <llvm@inglorion.net>2019-07-15 20:51:44 +0000
committerBob Haarman <llvm@inglorion.net>2019-07-15 20:51:44 +0000
commit794346460afa212690d0f006023a0e770884f0bb (patch)
tree70c62d65c3eb1506df05ef1356f6f4fdf59a3029 /clang/lib/Driver/ToolChains/Clang.cpp
parent39d888c1e42a62e02adfb5fe8da54cafe7e62b0b (diff)
downloadbcm5719-llvm-794346460afa212690d0f006023a0e770884f0bb.tar.gz
bcm5719-llvm-794346460afa212690d0f006023a0e770884f0bb.zip
[clang] allow -fthinlto-index= without -x ir
Summary: Previously, passing -fthinlto-index= to clang required that bitcode files be explicitly marked by -x ir. This change makes us detect files with object file extensions as bitcode files when -fthinlto-index= is present, so that explicitly marking them is no longer necessary. Explicitly specifying -x ir is still accepted and continues to be part of the test case to ensure we continue to support it. Reviewers: tejohnson, rnk, pcc Subscribers: mehdi_amini, steven_wu, dexonsmith, arphaman, cfe-commits Tags: #clang Differential Revision: https://reviews.llvm.org/D64610 llvm-svn: 366127
Diffstat (limited to 'clang/lib/Driver/ToolChains/Clang.cpp')
-rw-r--r--clang/lib/Driver/ToolChains/Clang.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 6a83e1a480a..6c3074b69e9 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -3647,8 +3647,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
if (const Arg *A = Args.getLastArg(options::OPT_fthinlto_index_EQ)) {
if (!types::isLLVMIR(Input.getType()))
- D.Diag(diag::err_drv_argument_only_allowed_with) << A->getAsString(Args)
- << "-x ir";
+ D.Diag(diag::err_drv_arg_requires_bitcode_input) << A->getAsString(Args);
Args.AddLastArg(CmdArgs, options::OPT_fthinlto_index_EQ);
}
OpenPOWER on IntegriCloud