From 26a4430ee5862eff0e5c951da89f730c604266b4 Mon Sep 17 00:00:00 2001 From: Hans Wennborg Date: Fri, 25 Apr 2014 16:44:17 +0000 Subject: 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 --- clang/lib/Driver/Tools.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'clang/lib/Driver/Tools.cpp') 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); -- cgit v1.2.3