summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--clang/include/clang/Basic/CodeGenOptions.def2
-rw-r--r--clang/include/clang/Basic/CodeGenOptions.h2
-rw-r--r--clang/include/clang/Driver/CC1Options.td6
-rw-r--r--clang/lib/CodeGen/BackendUtil.cpp9
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp4
-rw-r--r--clang/lib/Driver/ToolChains/Clang.cpp14
-rw-r--r--clang/lib/Frontend/CompilerInvocation.cpp17
-rw-r--r--clang/test/CodeGen/split-debug-filename.c7
-rw-r--r--clang/test/CodeGen/split-debug-output.c2
-rw-r--r--clang/test/CodeGen/split-debug-single-file.c13
-rw-r--r--clang/test/Driver/split-debug.c12
11 files changed, 17 insertions, 71 deletions
diff --git a/clang/include/clang/Basic/CodeGenOptions.def b/clang/include/clang/Basic/CodeGenOptions.def
index f08828d596e..cd7a8454876 100644
--- a/clang/include/clang/Basic/CodeGenOptions.def
+++ b/clang/include/clang/Basic/CodeGenOptions.def
@@ -261,8 +261,6 @@ CODEGENOPT(DebugExplicitImport, 1, 0) ///< Whether or not debug info should
///< contain explicit imports for
///< anonymous namespaces
-ENUM_CODEGENOPT(SplitDwarfMode, DwarfFissionKind, 2, NoFission) ///< DWARF fission mode to use.
-
CODEGENOPT(SplitDwarfInlining, 1, 1) ///< Whether to include inlining info in the
///< skeleton CU to allow for symbolication
///< of inline stack frames without .dwo files.
diff --git a/clang/include/clang/Basic/CodeGenOptions.h b/clang/include/clang/Basic/CodeGenOptions.h
index 2ece9e7f146..4e9025d2fea 100644
--- a/clang/include/clang/Basic/CodeGenOptions.h
+++ b/clang/include/clang/Basic/CodeGenOptions.h
@@ -71,8 +71,6 @@ public:
LocalExecTLSModel
};
- enum DwarfFissionKind { NoFission, SplitFileFission, SingleFileFission };
-
/// Clang versions with different platform ABI conformance.
enum class ClangABI {
/// Attempt to be ABI-compatible with code generated by Clang 3.8.x
diff --git a/clang/include/clang/Driver/CC1Options.td b/clang/include/clang/Driver/CC1Options.td
index 10b377e228d..8862a015827 100644
--- a/clang/include/clang/Driver/CC1Options.td
+++ b/clang/include/clang/Driver/CC1Options.td
@@ -230,8 +230,6 @@ def disable_red_zone : Flag<["-"], "disable-red-zone">,
HelpText<"Do not emit code that uses the red zone.">;
def dwarf_column_info : Flag<["-"], "dwarf-column-info">,
HelpText<"Turn on column location information.">;
-def split_dwarf : Flag<["-"], "split-dwarf">,
- HelpText<"Split out the dwarf .dwo sections">;
def dwarf_ext_refs : Flag<["-"], "dwarf-ext-refs">,
HelpText<"Generate debug info with external references to clang modules"
" or precompiled headers">;
@@ -694,10 +692,6 @@ def fblocks_runtime_optional : Flag<["-"], "fblocks-runtime-optional">,
HelpText<"Weakly link in the blocks runtime">;
def fexternc_nounwind : Flag<["-"], "fexternc-nounwind">,
HelpText<"Assume all functions with C linkage do not unwind">;
-def enable_split_dwarf : Flag<["-"], "enable-split-dwarf">,
- HelpText<"Use DWARF fission in 'split' mode">;
-def enable_split_dwarf_EQ : Joined<["-"], "enable-split-dwarf=">,
- HelpText<"Set DWARF fission mode to either 'split' or 'single'">, Values<"split,single">;
def split_dwarf_file : Separate<["-"], "split-dwarf-file">,
HelpText<"Name of the split dwarf debug info file to encode in the object file">;
def fno_wchar : Flag<["-"], "fno-wchar">,
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp
index 5fe4f145dad..5d66473e7b9 100644
--- a/clang/lib/CodeGen/BackendUtil.cpp
+++ b/clang/lib/CodeGen/BackendUtil.cpp
@@ -473,8 +473,7 @@ static void initTargetOptions(llvm::TargetOptions &Options,
Options.EmitAddrsig = CodeGenOpts.Addrsig;
Options.EnableDebugEntryValues = CodeGenOpts.EnableDebugEntryValues;
- if (CodeGenOpts.getSplitDwarfMode() != CodeGenOptions::NoFission)
- Options.MCOptions.SplitDwarfFile = CodeGenOpts.SplitDwarfFile;
+ Options.MCOptions.SplitDwarfFile = CodeGenOpts.SplitDwarfFile;
Options.MCOptions.MCRelaxAll = CodeGenOpts.RelaxAll;
Options.MCOptions.MCSaveTempLabels = CodeGenOpts.SaveTempLabels;
Options.MCOptions.MCUseDwarfDirectory = !CodeGenOpts.NoDwarfDirectoryAsm;
@@ -864,8 +863,7 @@ void EmitAssemblyHelper::EmitAssembly(BackendAction Action,
break;
default:
- if (!CodeGenOpts.SplitDwarfOutput.empty() &&
- (CodeGenOpts.getSplitDwarfMode() == CodeGenOptions::SplitFileFission)) {
+ if (!CodeGenOpts.SplitDwarfOutput.empty()) {
DwoOS = openOutputFile(CodeGenOpts.SplitDwarfOutput);
if (!DwoOS)
return;
@@ -1282,8 +1280,7 @@ void EmitAssemblyHelper::EmitAssemblyWithNewPassManager(
NeedCodeGen = true;
CodeGenPasses.add(
createTargetTransformInfoWrapperPass(getTargetIRAnalysis()));
- if (!CodeGenOpts.SplitDwarfOutput.empty() &&
- CodeGenOpts.getSplitDwarfMode() == CodeGenOptions::SplitFileFission) {
+ if (!CodeGenOpts.SplitDwarfOutput.empty()) {
DwoOS = openOutputFile(CodeGenOpts.SplitDwarfOutput);
if (!DwoOS)
return;
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index e8a6762d2b8..eb0034e7083 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -615,9 +615,7 @@ void CGDebugInfo::CreateCompileUnit() {
LangTag, CUFile, CGOpts.EmitVersionIdentMetadata ? Producer : "",
LO.Optimize || CGOpts.PrepareForLTO || CGOpts.PrepareForThinLTO,
CGOpts.DwarfDebugFlags, RuntimeVers,
- (CGOpts.getSplitDwarfMode() != CodeGenOptions::NoFission)
- ? ""
- : CGOpts.SplitDwarfFile,
+ CGOpts.SplitDwarfFile,
EmissionKind, DwoId, CGOpts.SplitDwarfInlining,
CGOpts.DebugInfoForProfiling,
CGM.getTarget().getTriple().isNVPTX()
diff --git a/clang/lib/Driver/ToolChains/Clang.cpp b/clang/lib/Driver/ToolChains/Clang.cpp
index 3e7158ae80b..f292944a2ef 100644
--- a/clang/lib/Driver/ToolChains/Clang.cpp
+++ b/clang/lib/Driver/ToolChains/Clang.cpp
@@ -3292,18 +3292,8 @@ static void RenderDebugOptions(const ToolChain &TC, const Driver &D,
}
}
- // -gsplit-dwarf enables the backend dwarf splitting and extraction.
- if (T.isOSBinFormatELF()) {
- if (!SplitDWARFInlining)
- CmdArgs.push_back("-fno-split-dwarf-inlining");
-
- if (DwarfFission != DwarfFissionKind::None) {
- if (DwarfFission == DwarfFissionKind::Single)
- CmdArgs.push_back("-enable-split-dwarf=single");
- else
- CmdArgs.push_back("-enable-split-dwarf");
- }
- }
+ if (T.isOSBinFormatELF() && !SplitDWARFInlining)
+ CmdArgs.push_back("-fno-split-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/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp
index cdb6d735364..ddaf13ff0d3 100644
--- a/clang/lib/Frontend/CompilerInvocation.cpp
+++ b/clang/lib/Frontend/CompilerInvocation.cpp
@@ -729,23 +729,6 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
Opts.SplitDwarfFile = Args.getLastArgValue(OPT_split_dwarf_file);
Opts.SplitDwarfOutput = Args.getLastArgValue(OPT_split_dwarf_output);
Opts.SplitDwarfInlining = !Args.hasArg(OPT_fno_split_dwarf_inlining);
-
- if (Arg *A =
- Args.getLastArg(OPT_enable_split_dwarf, OPT_enable_split_dwarf_EQ)) {
- if (A->getOption().matches(options::OPT_enable_split_dwarf)) {
- Opts.setSplitDwarfMode(CodeGenOptions::SplitFileFission);
- } else {
- StringRef Name = A->getValue();
- if (Name == "single")
- Opts.setSplitDwarfMode(CodeGenOptions::SingleFileFission);
- else if (Name == "split")
- Opts.setSplitDwarfMode(CodeGenOptions::SplitFileFission);
- else
- Diags.Report(diag::err_drv_invalid_value)
- << A->getAsString(Args) << Name;
- }
- }
-
Opts.DebugTypeExtRefs = Args.hasArg(OPT_dwarf_ext_refs);
Opts.DebugExplicitImport = Args.hasArg(OPT_dwarf_explicit_import);
Opts.DebugFwdTemplateParams = Args.hasArg(OPT_debug_forward_template_params);
diff --git a/clang/test/CodeGen/split-debug-filename.c b/clang/test/CodeGen/split-debug-filename.c
index ff45ad61791..5a0562c8456 100644
--- a/clang/test/CodeGen/split-debug-filename.c
+++ b/clang/test/CodeGen/split-debug-filename.c
@@ -1,7 +1,6 @@
// REQUIRES: x86-registered-target
// 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
-// RUN: %clang_cc1 -triple x86_64-unknown-linux -debug-info-kind=limited -enable-split-dwarf -split-dwarf-file %t.dwo -split-dwarf-output %t.dwo -emit-obj -o - %s | llvm-readobj -S - | FileCheck --check-prefix=O %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux -debug-info-kind=limited -split-dwarf-file %t.dwo -split-dwarf-output %t.dwo -emit-obj -o - %s | llvm-readobj -S - | FileCheck --check-prefix=O %s
// RUN: llvm-readobj -S %t.dwo | FileCheck --check-prefix=DWO %s
int main (void) {
@@ -11,9 +10,5 @@ int main (void) {
// 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
-
// O-NOT: .dwo
// DWO: .dwo
diff --git a/clang/test/CodeGen/split-debug-output.c b/clang/test/CodeGen/split-debug-output.c
index e312dd9cc84..1507edd2484 100644
--- a/clang/test/CodeGen/split-debug-output.c
+++ b/clang/test/CodeGen/split-debug-output.c
@@ -1,5 +1,5 @@
// REQUIRES: x86-registered-target
-// RUN: %clang_cc1 -triple x86_64-unknown-linux -debug-info-kind=limited -enable-split-dwarf -split-dwarf-file foo.dwo -split-dwarf-output %t -emit-obj -o - %s | llvm-dwarfdump -debug-info - | FileCheck %s
+// RUN: %clang_cc1 -triple x86_64-unknown-linux -debug-info-kind=limited -split-dwarf-file foo.dwo -split-dwarf-output %t -emit-obj -o - %s | llvm-dwarfdump -debug-info - | FileCheck %s
// RUN: llvm-dwarfdump -debug-info %t | FileCheck %s
int f() { return 0; }
diff --git a/clang/test/CodeGen/split-debug-single-file.c b/clang/test/CodeGen/split-debug-single-file.c
index a963ef577ac..384e62cb50a 100644
--- a/clang/test/CodeGen/split-debug-single-file.c
+++ b/clang/test/CodeGen/split-debug-single-file.c
@@ -1,20 +1,21 @@
// REQUIRES: x86-registered-target
-// Testing to ensure -enable-split-dwarf=single allows to place .dwo sections into regular output object.
+// Testing to ensure that setting only -split-dwarf-file allows to place .dwo sections into regular output object.
// RUN: %clang_cc1 -debug-info-kind=limited -triple x86_64-unknown-linux \
-// RUN: -enable-split-dwarf=single -split-dwarf-file %t.o -emit-obj -o %t.o %s -fno-experimental-new-pass-manager
+// RUN: -split-dwarf-file %t.o -emit-obj -o %t.o %s -fno-experimental-new-pass-manager
// RUN: llvm-readobj -S %t.o | FileCheck --check-prefix=MODE-SINGLE %s
// RUN: %clang_cc1 -debug-info-kind=limited -triple x86_64-unknown-linux \
-// RUN: -enable-split-dwarf=single -split-dwarf-file %t.o -emit-obj -o %t.o %s -fexperimental-new-pass-manager
+// RUN: -split-dwarf-file %t.o -emit-obj -o %t.o %s -fexperimental-new-pass-manager
// RUN: llvm-readobj -S %t.o | FileCheck --check-prefix=MODE-SINGLE %s
// MODE-SINGLE: .dwo
-// Testing to ensure -enable-split-dwarf=split does not place .dwo sections into regular output object.
+// Testing to ensure that setting both -split-dwarf-file and -split-dwarf-output
+// does not place .dwo sections into regular output object.
// RUN: %clang_cc1 -debug-info-kind=limited -triple x86_64-unknown-linux \
-// RUN: -enable-split-dwarf=split -split-dwarf-file %t.dwo -split-dwarf-output %t.dwo -emit-obj -o %t.o %s -fno-experimental-new-pass-manager
+// RUN: -split-dwarf-file %t.dwo -split-dwarf-output %t.dwo -emit-obj -o %t.o %s -fno-experimental-new-pass-manager
// RUN: llvm-readobj -S %t.o | FileCheck --check-prefix=MODE-SPLIT %s
// RUN: %clang_cc1 -debug-info-kind=limited -triple x86_64-unknown-linux \
-// RUN: -enable-split-dwarf=split -split-dwarf-file %t.dwo -split-dwarf-output %t.dwo -emit-obj -o %t.o %s -fexperimental-new-pass-manager
+// RUN: -split-dwarf-file %t.dwo -split-dwarf-output %t.dwo -emit-obj -o %t.o %s -fexperimental-new-pass-manager
// RUN: llvm-readobj -S %t.o | FileCheck --check-prefix=MODE-SPLIT %s
// MODE-SPLIT-NOT: .dwo
diff --git a/clang/test/Driver/split-debug.c b/clang/test/Driver/split-debug.c
index 05861ea280d..860aebb526f 100644
--- a/clang/test/Driver/split-debug.c
+++ b/clang/test/Driver/split-debug.c
@@ -13,7 +13,6 @@
// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf=single -c -### %s 2> %t
// RUN: FileCheck -check-prefix=CHECK-ACTIONS-SINGLE-SPLIT < %t %s
//
-// CHECK-ACTIONS-SINGLE-SPLIT: "-enable-split-dwarf=single"
// CHECK-ACTIONS-SINGLE-SPLIT: "-split-dwarf-file" "split-debug.o"
// CHECK-ACTIONS-SINGLE-SPLIT-NOT: "-split-dwarf-output"
@@ -58,7 +57,6 @@
// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -gmlt -fno-split-dwarf-inlining -S -### %s 2> %t
// RUN: FileCheck -check-prefix=CHECK-GMLT-WITH-SPLIT < %t %s
//
-// CHECK-GMLT-WITH-SPLIT: "-enable-split-dwarf"
// CHECK-GMLT-WITH-SPLIT: "-debug-info-kind=line-tables-only"
// CHECK-GMLT-WITH-SPLIT: "-split-dwarf-file"
// CHECK-GMLT-WITH-SPLIT: "-split-dwarf-output"
@@ -66,28 +64,24 @@
// RUN: %clang -target x86_64-unknown-linux-gnu -g -fno-split-dwarf-inlining -S -### %s 2> %t
// RUN: FileCheck -check-prefix=CHECK-NOINLINE-WITHOUT-SPLIT < %t %s
//
-// CHECK-NOINLINE-WITHOUT-SPLIT-NOT: "-enable-split-dwarf"
// CHECK-NOINLINE-WITHOUT-SPLIT: "-fno-split-dwarf-inlining"
// CHECK-NOINLINE-WITHOUT-SPLIT: "-debug-info-kind=limited"
// RUN: %clang -target x86_64-unknown-linux-gnu -gmlt -gsplit-dwarf -fno-split-dwarf-inlining -S -### %s 2> %t
// RUN: FileCheck -check-prefix=CHECK-SPLIT-WITH-GMLT < %t %s
//
-// CHECK-SPLIT-WITH-GMLT: "-enable-split-dwarf"
// CHECK-SPLIT-WITH-GMLT: "-debug-info-kind=limited"
// CHECK-SPLIT-WITH-GMLT: "-split-dwarf-output"
// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -fno-split-dwarf-inlining -S -### %s 2> %t
// RUN: FileCheck -check-prefix=CHECK-SPLIT-WITH-NOINL < %t %s
//
-// CHECK-SPLIT-WITH-NOINL: "-enable-split-dwarf"
// CHECK-SPLIT-WITH-NOINL: "-debug-info-kind=limited"
// CHECK-SPLIT-WITH-NOINL: "-split-dwarf-output"
// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -gmlt -S -### %s 2> %t
// RUN: FileCheck -check-prefix=CHECK-GMLT-OVER-SPLIT < %t %s
//
-// CHECK-GMLT-OVER-SPLIT-NOT: "-enable-split-dwarf"
// CHECK-GMLT-OVER-SPLIT: "-debug-info-kind=line-tables-only"
// CHECK-GMLT-OVER-SPLIT-NOT: "-split-dwarf-file"
// CHECK-GMLT-OVER-SPLIT-NOT: "-split-dwarf-output"
@@ -95,14 +89,13 @@
// RUN: %clang -target x86_64-unknown-linux-gnu -gmlt -gsplit-dwarf -S -### %s 2> %t
// RUN: FileCheck -check-prefix=CHECK-SPLIT-OVER-GMLT < %t %s
//
-// CHECK-SPLIT-OVER-GMLT: "-enable-split-dwarf" "-debug-info-kind=limited"
+// CHECK-SPLIT-OVER-GMLT: "-debug-info-kind=limited"
// CHECK-SPLIT-OVER-GMLT: "-split-dwarf-file"
// CHECK-SPLIT-OVER-GMLT: "-split-dwarf-output"
// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -g0 -fno-split-dwarf-inlining -S -### %s 2> %t
// RUN: FileCheck -check-prefix=CHECK-G0-OVER-SPLIT < %t %s
//
-// CHECK-G0-OVER-SPLIT-NOT: "-enable-split-dwarf"
// CHECK-G0-OVER-SPLIT-NOT: "-debug-info-kind
// CHECK-G0-OVER-SPLIT-NOT: "-split-dwarf-file"
// CHECK-G0-OVER-SPLIT-NOT: "-split-dwarf-output"
@@ -112,7 +105,6 @@
// RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf=split -g0 -S -### %s 2> %t
// RUN: FileCheck -check-prefix=CHECK-G0-OVER-SPLIT < %t %s
//
-// CHECK-G0-OVER-SPLIT-NOT: "-enable-split-dwarf"
// CHECK-G0-OVER-SPLIT-NOT: "-debug-info-kind
// CHECK-G0-OVER-SPLIT-NOT: "-split-dwarf-file"
// CHECK-G0-OVER-SPLIT-NOT: "-split-dwarf-output"
@@ -122,6 +114,6 @@
// RUN: %clang -target x86_64-unknown-linux-gnu -g0 -gsplit-dwarf=split -S -### %s 2> %t
// RUN: FileCheck -check-prefix=CHECK-SPLIT-OVER-G0 < %t %s
//
-// CHECK-SPLIT-OVER-G0: "-enable-split-dwarf" "-debug-info-kind=limited"
+// CHECK-SPLIT-OVER-G0: "-debug-info-kind=limited"
// CHECK-SPLIT-OVER-G0: "-split-dwarf-file"
// CHECK-SPLIT-OVER-G0: "-split-dwarf-output"
OpenPOWER on IntegriCloud