aaronpuchert added inline comments.
================ Comment at: include/clang/Basic/CodeGenOptions.def:263 -ENUM_CODEGENOPT(SplitDwarfMode, DwarfFissionKind, 2, NoFission) ///< DWARF fission mode to use. +CODEGENOPT(EnableSplitDwarf, 1, 0) ///< Whether to enable split DWARF. ---------------- aaronpuchert wrote: > dblaikie wrote: > > Could we skip this and rely on "SplitDwarFile" being non-empty? > I think not, have a look at test/CodeGen/split-debug-filename.c: > > ``` > // RUN: %clang_cc1 -debug-info-kind=limited -split-dwarf-file foo.dwo -S > -emit-llvm -o - %s | FileCheck %s > // RUN: %clang_cc1 -debug-info-kind=limited -enable-split-dwarf > -split-dwarf-file foo.dwo -S -emit-llvm -o - %s | FileCheck > --check-prefix=VANILLA %s > // ... > > // Testing to ensure that the dwo name gets output into the compile unit. > // CHECK: !DICompileUnit({{.*}}, splitDebugFilename: "foo.dwo" > > // Testing to ensure that the dwo name is not output into the compile unit if > // it's for vanilla split-dwarf rather than split-dwarf for implicit modules. > // VANILLA-NOT: splitDebugFilename > ``` > > This seems intentional. Although if that's up to change, I think we can drop it. If I'm not overlooking anything, `-enable-split-dwarf` does nothing when `-emit-llvm` is also given. So I'm not sure we lose anything by treating it the same way as `-emit-llvm -split-dwarf-file ...` without `-enable-split-dwarf`. Actually `llc` has exactly that behavior (inferring whether to enable Split DWARF depending on whether there was a `-split-dwarf-file` argument), as I remarked in D59673#1457720, but it doesn't emit IR and doesn't have to deal with implicit modules... Repository: rC Clang CHANGES SINCE LAST ACTION https://reviews.llvm.org/D63167/new/ https://reviews.llvm.org/D63167 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits