File tree Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Expand file tree Collapse file tree 2 files changed +12
-6
lines changed Original file line number Diff line number Diff line change @@ -4764,9 +4764,9 @@ Action *Driver::ConstructPhaseAction(
47644764 case phases::Backend: {
47654765 if (isUsingLTO () && TargetDeviceOffloadKind == Action::OFK_None) {
47664766 types::ID Output;
4767- if (Args.hasArg (options::OPT_ffat_lto_objects))
4768- Output = Args.hasArg (options::OPT_emit_llvm) ? types::TY_LTO_IR
4769- : types::TY_PP_Asm;
4767+ if (Args.hasArg (options::OPT_ffat_lto_objects) &&
4768+ ! Args.hasArg (options::OPT_emit_llvm))
4769+ Output = types::TY_PP_Asm;
47704770 else if (Args.hasArg (options::OPT_S))
47714771 Output = types::TY_LTO_IR;
47724772 else
Original file line number Diff line number Diff line change 2323// CHECK-CC-S-EL-LTO-SAME: -emit-llvm
2424// CHECK-CC-S-EL-LTO-SAME: -ffat-lto-objects
2525
26- /// When fat LTO is enabled wihtout -S we expect native object output and -ffat-lto-object to be passed to cc1.
26+ /// When fat LTO is enabled without -S we expect native object output and -ffat-lto-object to be passed to cc1.
2727// RUN: %clang --target=x86_64-unknown-linux-gnu -flto -ffat-lto-objects -### %s -c 2>&1 | FileCheck %s -check-prefix=CHECK-CC-C-LTO
2828// CHECK-CC-C-LTO: -cc1
29- // CHECK-CC-C-LTO: -emit-obj
30- // CHECK-CC-C-LTO: -ffat-lto-objects
29+ // CHECK-CC-C-LTO-SAME: -emit-obj
30+ // CHECK-CC-C-LTO-SAME: -ffat-lto-objects
31+
32+ /// When fat LTO is enabled with -c and -emit-llvm we expect bitcode output and -ffat-lto-object to be passed to cc1.
33+ // RUN: %clang --target=x86_64-unknown-linux-gnu -flto -ffat-lto-objects -### %s -c -emit-llvm 2>&1 | FileCheck %s -check-prefix=CHECK-CC-C-EL-LTO
34+ // CHECK-CC-C-EL-LTO: -cc1
35+ // CHECK-CC-C-EL-LTO-SAME: -emit-llvm-bc
36+ // CHECK-CC-C-EL-LTO-SAME: -ffat-lto-objects
3137
3238/// Make sure we don't have a warning for -ffat-lto-objects being unused
3339// RUN: %clang --target=x86_64-unknown-linux-gnu -ffat-lto-objects -fdriver-only -Werror -v %s -c 2>&1 | FileCheck %s -check-prefix=CHECK-CC-NOLTO
You can’t perform that action at this time.
0 commit comments