Use LLVM LTO instead of IR types to improve compatibility

LLVM IR types use ".ll" and ".bc" suffixes which can break compatiblity
with the existing software, so we switch to the LLVM LTO types instead
which use the standard ".s" and ".o" suffixes.

BUG=https://bugs.chromium.org/p/nativeclient/issues/detail?id=4347
R=dschuff@chromium.org

Review URL: https://codereview.chromium.org/1810033004 .
diff --git a/lib/Driver/Driver.cpp b/lib/Driver/Driver.cpp
index 9dd557c..f2550a1 100644
--- a/lib/Driver/Driver.cpp
+++ b/lib/Driver/Driver.cpp
@@ -1364,12 +1364,12 @@
                                                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);