diff --git a/clang/include/clang/Driver/Options.td b/clang/include/clang/Driver/Options.td --- a/clang/include/clang/Driver/Options.td +++ b/clang/include/clang/Driver/Options.td @@ -2669,9 +2669,9 @@ PosFlag, NegFlag>; defm split_dwarf_inlining : BoolFOption<"split-dwarf-inlining", - CodeGenOpts<"SplitDwarfInlining">, DefaultTrue, - NegFlag, - PosFlag, DefaultFalse, + NegFlag, + PosFlag>; def fdebug_default_version: Joined<["-"], "fdebug-default-version=">, Group, diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp --- a/clang/lib/Driver/ToolChains/Clang.cpp +++ b/clang/lib/Driver/ToolChains/Clang.cpp @@ -3979,8 +3979,8 @@ } } - if (T.isOSBinFormatELF() && !SplitDWARFInlining) - CmdArgs.push_back("-fno-split-dwarf-inlining"); + if (T.isOSBinFormatELF() && SplitDWARFInlining) + CmdArgs.push_back("-fsplit-dwarf-inlining"); // After we've dealt with all combinations of things that could // make DebugInfoKind be other than None or DebugLineTablesOnly, diff --git a/clang/test/CodeGen/split-debug-inlining.c b/clang/test/CodeGen/split-debug-inlining.c --- a/clang/test/CodeGen/split-debug-inlining.c +++ b/clang/test/CodeGen/split-debug-inlining.c @@ -1,5 +1,5 @@ -// RUN: %clang_cc1 -debug-info-kind=limited -fno-split-dwarf-inlining -S -emit-llvm -o - %s | FileCheck %s -// RUN: %clang_cc1 -debug-info-kind=limited -S -emit-llvm -o - %s | FileCheck --check-prefix=ABSENT %s +// RUN: %clang_cc1 -debug-info-kind=limited -S -emit-llvm -o - %s | FileCheck %s +// RUN: %clang_cc1 -debug-info-kind=limited -fsplit-dwarf-inlining -S -emit-llvm -o - %s | FileCheck --check-prefix=ABSENT %s void f(void) {} // Verify that disabling split debug inlining info is propagated to the debug // info metadata. diff --git a/clang/test/Driver/split-debug.c b/clang/test/Driver/split-debug.c --- a/clang/test/Driver/split-debug.c +++ b/clang/test/Driver/split-debug.c @@ -7,8 +7,8 @@ /// -gsplit-dwarf=split is equivalent to -gsplit-dwarf. // RUN: %clang -### -c -target x86_64 -gsplit-dwarf=split -g %s 2>&1 | FileCheck %s --check-prefixes=NOINLINE,SPLIT -// INLINE-NOT: "-fno-split-dwarf-inlining" -// NOINLINE: "-fno-split-dwarf-inlining" +// INLINE: "-fsplit-dwarf-inlining" +// NOINLINE-NOT: "-fsplit-dwarf-inlining" // SPLIT: "-debug-info-kind=limited" // SPLIT-SAME: "-ggnu-pubnames" // SPLIT-SAME: "-split-dwarf-file" "split-debug.dwo" "-split-dwarf-output" "split-debug.dwo"