Index: lib/Driver/Driver.cpp |
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp |
index 9dd557cf780a57a094be4a45d9febdd17d25193c..f2550a1c3d7e35a75768cd665f23404e66607775 100644 |
--- a/lib/Driver/Driver.cpp |
+++ b/lib/Driver/Driver.cpp |
@@ -1364,12 +1364,12 @@ Driver::ConstructPhaseAction(const ToolChain &TC, const ArgList &Args, |
types::TY_LLVM_BC); |
} |
case phases::Backend: { |
- if (IsUsingLTO(TC, Args)) { |
+ if (IsUsingLTO(TC, Args) || TC.isBitcodeOnlyTarget()) { |
types::ID Output = |
Args.hasArg(options::OPT_S) ? types::TY_LTO_IR : types::TY_LTO_BC; |
return llvm::make_unique<BackendJobAction>(std::move(Input), Output); |
} |
- if (Args.hasArg(options::OPT_emit_llvm) || TC.isBitcodeOnlyTarget()) { |
+ if (Args.hasArg(options::OPT_emit_llvm)) { |
types::ID Output = |
Args.hasArg(options::OPT_S) ? types::TY_LLVM_IR : types::TY_LLVM_BC; |
return llvm::make_unique<BackendJobAction>(std::move(Input), Output); |