summaryrefslogtreecommitdiffstats
path: root/clang/lib/Driver/Tools.cpp
diff options
context:
space:
mode:
authorHans Wennborg <hans@hanshq.net>2014-04-25 16:44:17 +0000
committerHans Wennborg <hans@hanshq.net>2014-04-25 16:44:17 +0000
commit26a4430ee5862eff0e5c951da89f730c604266b4 (patch)
treefe377fe8fe87453893fecec231d6572bdb5f7ca8 /clang/lib/Driver/Tools.cpp
parentbbb5f07626835f063fd7e10427dec383e6ad0adf (diff)
downloadbcm5719-llvm-26a4430ee5862eff0e5c951da89f730c604266b4.tar.gz
bcm5719-llvm-26a4430ee5862eff0e5c951da89f730c604266b4.zip
clang-cl: /fallback only applies to C or C++ files
We would previously hit an assert if using /fallback with an .ll file. llvm-svn: 207234
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
-rw-r--r--clang/lib/Driver/Tools.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp
index 924e040246d..991fe4358ea 100644
--- a/clang/lib/Driver/Tools.cpp
+++ b/clang/lib/Driver/Tools.cpp
@@ -4066,7 +4066,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
// Finally add the compile command to the compilation.
if (Args.hasArg(options::OPT__SLASH_fallback) &&
- Output.getType() == types::TY_Object) {
+ Output.getType() == types::TY_Object &&
+ (InputType == types::TY_C || InputType == types::TY_CXX)) {
tools::visualstudio::Compile CL(getToolChain());
Command *CLCommand = CL.GetCommand(C, JA, Output, Inputs, Args,
LinkingOutput);
OpenPOWER on IntegriCloud