]> granicus.if.org Git - clang/commitdiff
[Clang] Rename -split-dwarf-file to -split-dwarf-output
authorAaron Puchert <aaron.puchert@sap.com>
Sat, 15 Jun 2019 14:07:43 +0000 (14:07 +0000)
committerAaron Puchert <aaron.puchert@sap.com>
Sat, 15 Jun 2019 14:07:43 +0000 (14:07 +0000)
Summary:
This is the first in a series of changes trying to align clang -cc1
flags for Split DWARF with those of llc. The unfortunate side effect of
having -split-dwarf-output for single file Split DWARF will disappear
again in a subsequent change.

The change is the result of a discussion in D59673.

Reviewers: dblaikie, echristo

Reviewed By: dblaikie

Differential Revision: https://reviews.llvm.org/D63130

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@363494 91177308-0d34-0410-b5e6-96231b3b80d8

15 files changed:
include/clang/Basic/CodeGenOptions.h
include/clang/Driver/CC1Options.td
lib/CodeGen/BackendUtil.cpp
lib/CodeGen/CGDebugInfo.cpp
lib/Driver/ToolChains/Clang.cpp
lib/Frontend/CompilerInvocation.cpp
test/CodeGen/split-debug-filename.c
test/CodeGen/split-debug-single-file.c
test/CodeGen/thinlto-split-dwarf.c
test/Driver/fuchsia.c
test/Driver/split-debug.c
test/Driver/split-debug.s
test/Misc/cc1as-split-dwarf.s
test/Modules/pch_container.m
tools/driver/cc1as_main.cpp

index 1aaa04efd610e5bf0e0b5de6addfbda0ab5ca458..f8c82b4f0e6c4cbb42ad957f841d0ec23ffa0512 100644 (file)
@@ -187,7 +187,7 @@ public:
 
   /// The name for the split debug info file that we'll break out. This is used
   /// in the backend for setting the name in the skeleton cu.
-  std::string SplitDwarfFile;
+  std::string SplitDwarfOutput;
 
   /// The name of the relocation model to use.
   llvm::Reloc::Model RelocationModel;
index 1aad3b70ea9854b6386f355be081b08e0a1582c0..ec102a06bbc136ea92e55834713c28ff44316494 100644 (file)
@@ -683,7 +683,7 @@ def version : Flag<["-"], "version">,
   HelpText<"Print the compiler version">;
 def main_file_name : Separate<["-"], "main-file-name">,
   HelpText<"Main file name to use for debug info">;
-def split_dwarf_file : Separate<["-"], "split-dwarf-file">,
+def split_dwarf_output : Separate<["-"], "split-dwarf-output">,
   HelpText<"File name to use for split dwarf debug info output">;
 
 }
index 53292bec5e2e2d973bbb4ad8700718d708a5a086..4d04a86ea6b0bd1388e5a2c9bb4840be47e404c8 100644 (file)
@@ -472,7 +472,7 @@ static void initTargetOptions(llvm::TargetOptions &Options,
   Options.EmitAddrsig = CodeGenOpts.Addrsig;
 
   if (CodeGenOpts.getSplitDwarfMode() != CodeGenOptions::NoFission)
-    Options.MCOptions.SplitDwarfFile = CodeGenOpts.SplitDwarfFile;
+    Options.MCOptions.SplitDwarfFile = CodeGenOpts.SplitDwarfOutput;
   Options.MCOptions.MCRelaxAll = CodeGenOpts.RelaxAll;
   Options.MCOptions.MCSaveTempLabels = CodeGenOpts.SaveTempLabels;
   Options.MCOptions.MCUseDwarfDirectory = !CodeGenOpts.NoDwarfDirectoryAsm;
@@ -862,9 +862,9 @@ void EmitAssemblyHelper::EmitAssembly(BackendAction Action,
     break;
 
   default:
-    if (!CodeGenOpts.SplitDwarfFile.empty() &&
+    if (!CodeGenOpts.SplitDwarfOutput.empty() &&
         (CodeGenOpts.getSplitDwarfMode() == CodeGenOptions::SplitFileFission)) {
-      DwoOS = openOutputFile(CodeGenOpts.SplitDwarfFile);
+      DwoOS = openOutputFile(CodeGenOpts.SplitDwarfOutput);
       if (!DwoOS)
         return;
     }
@@ -1275,9 +1275,9 @@ void EmitAssemblyHelper::EmitAssemblyWithNewPassManager(
     NeedCodeGen = true;
     CodeGenPasses.add(
         createTargetTransformInfoWrapperPass(getTargetIRAnalysis()));
-    if (!CodeGenOpts.SplitDwarfFile.empty() &&
+    if (!CodeGenOpts.SplitDwarfOutput.empty() &&
         CodeGenOpts.getSplitDwarfMode() == CodeGenOptions::SplitFileFission) {
-      DwoOS = openOutputFile(CodeGenOpts.SplitDwarfFile);
+      DwoOS = openOutputFile(CodeGenOpts.SplitDwarfOutput);
       if (!DwoOS)
         return;
     }
@@ -1428,7 +1428,7 @@ static void runThinLTOBackend(ModuleSummaryIndex *CombinedIndex, Module *M,
   Conf.RemarksWithHotness = CGOpts.DiagnosticsWithHotness;
   Conf.RemarksFilename = CGOpts.OptRecordFile;
   Conf.RemarksPasses = CGOpts.OptRecordPasses;
-  Conf.DwoPath = CGOpts.SplitDwarfFile;
+  Conf.DwoPath = CGOpts.SplitDwarfOutput;
   switch (Action) {
   case Backend_EmitNothing:
     Conf.PreCodeGenModuleHook = [](size_t Task, const Module &Mod) {
index af9bac9b388fe277d00a034468f9d08ea06f3a18..ff2caeaf8a43ddc1e53f4aebc6f650f2698652f9 100644 (file)
@@ -616,7 +616,7 @@ void CGDebugInfo::CreateCompileUnit() {
       CGOpts.DwarfDebugFlags, RuntimeVers,
       (CGOpts.getSplitDwarfMode() != CodeGenOptions::NoFission)
           ? ""
-          : CGOpts.SplitDwarfFile,
+          : CGOpts.SplitDwarfOutput,
       EmissionKind, DwoId, CGOpts.SplitDwarfInlining,
       CGOpts.DebugInfoForProfiling,
       CGM.getTarget().getTriple().isNVPTX()
index 29bdaf067f5f265369f51f23e088f582341fef2e..17eff88581951473c671841328915a4c0f487dad 100644 (file)
@@ -4110,7 +4110,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
                      isa<BackendJobAction>(JA));
   const char *SplitDWARFOut;
   if (SplitDWARF) {
-    CmdArgs.push_back("-split-dwarf-file");
+    CmdArgs.push_back("-split-dwarf-output");
     SplitDWARFOut = SplitDebugName(Args, Input, Output);
     CmdArgs.push_back(SplitDWARFOut);
   }
@@ -6180,7 +6180,7 @@ void ClangAs::ConstructJob(Compilation &C, const JobAction &JA,
   Arg *A;
   if (getDebugFissionKind(D, Args, A) == DwarfFissionKind::Split &&
       T.isOSBinFormatELF()) {
-    CmdArgs.push_back("-split-dwarf-file");
+    CmdArgs.push_back("-split-dwarf-output");
     CmdArgs.push_back(SplitDebugName(Args, Input, Output));
   }
 
index 7ba08c6acad050c09fcbed0ab64911e788173e03..45b0d1d649927e2ea3a422bc4084d403a3e34b0e 100644 (file)
@@ -726,7 +726,7 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK,
   Opts.MacroDebugInfo = Args.hasArg(OPT_debug_info_macro);
   Opts.WholeProgramVTables = Args.hasArg(OPT_fwhole_program_vtables);
   Opts.LTOVisibilityPublicStd = Args.hasArg(OPT_flto_visibility_public_std);
-  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 =
index b8ce639f0fe836d03e9fab86a95689cbabdc891a..b73a68636245f9bbee891779c1e074bac922d0d0 100644 (file)
@@ -1,7 +1,7 @@
 // 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 -emit-obj -o - %s | llvm-readobj -S - | FileCheck --check-prefix=O %s
+// RUN: %clang_cc1 -debug-info-kind=limited -split-dwarf-output foo.dwo -S -emit-llvm -o - %s | FileCheck %s
+// RUN: %clang_cc1 -debug-info-kind=limited -enable-split-dwarf -split-dwarf-output 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-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) {
index 1c775d09411cac122685a2d3147966147c4f436c..d572e015b84af5d95d69fee3f884824fdd522c82 100644 (file)
@@ -2,19 +2,19 @@
 
 // Testing to ensure -enable-split-dwarf=single 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:   -enable-split-dwarf=single -split-dwarf-output %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:   -enable-split-dwarf=single -split-dwarf-output %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.
 //  RUN: %clang_cc1 -debug-info-kind=limited -triple x86_64-unknown-linux \
-//  RUN:   -enable-split-dwarf=split -split-dwarf-file %t.o -emit-obj -o %t.o %s -fno-experimental-new-pass-manager
+//  RUN:   -enable-split-dwarf=split -split-dwarf-output %t.o -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.o -emit-obj -o %t.o %s -fexperimental-new-pass-manager
+//  RUN:   -enable-split-dwarf=split -split-dwarf-output %t.o -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
 
index 4391345ad454933912b5fda5ce2435327440391d..ded58416e26bcfb59695b11c319187de3a596815 100644 (file)
@@ -10,7 +10,7 @@
 
 // RUN: %clang_cc1 -triple x86_64-unknown-linux-gnu \
 // RUN:   -emit-obj -fthinlto-index=%t.o.thinlto.bc \
-// RUN:   -o %t.native.o -split-dwarf-file %t.native.dwo -x ir %t.o
+// RUN:   -o %t.native.o -split-dwarf-output %t.native.dwo -x ir %t.o
 
 // RUN: llvm-readobj -S %t.native.o | FileCheck --check-prefix=O %s
 // RUN: llvm-readobj -S %t.native.dwo | FileCheck --check-prefix=DWO %s
index 5cee88cd1e532019be5811bbf1734ba069709a02..c31e3739b5dff39f8629bedd0c725f7b5dbf9086 100644 (file)
 // RUN: %clang %s -### --target=x86_64-fuchsia \
 // RUN:     -gsplit-dwarf -c %s 2>&1 \
 // RUN:     | FileCheck %s -check-prefix=CHECK-SPLIT-DWARF
-// CHECK-SPLIT-DWARF: "-split-dwarf-file" "fuchsia.dwo"
+// CHECK-SPLIT-DWARF: "-split-dwarf-output" "fuchsia.dwo"
index dfc77bbc08528f8451071a4223ec546d106a88f6..a6d56317cecd605b71dd6e3b16278927b2ea7981 100644 (file)
@@ -3,7 +3,7 @@
 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -c -### %s 2> %t
 // RUN: FileCheck -check-prefix=CHECK-ACTIONS < %t %s
 //
-// CHECK-ACTIONS: "-split-dwarf-file" "split-debug.dwo"
+// CHECK-ACTIONS: "-split-dwarf-output" "split-debug.dwo"
 
 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -c -### %s 2> %t
 // RUN: FileCheck -check-prefix=CHECK-ACTIONS < %t %s
 // 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: "-split-dwarf-output" "split-debug.o"
 
 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf=single -c -### -o %tfoo.o %s 2> %t
 // RUN: FileCheck -check-prefix=CHECK-SINGLE-SPLIT-FILENAME < %t %s
 //
-// CHECK-SINGLE-SPLIT-FILENAME: "-split-dwarf-file" "{{.*}}foo.o"
+// CHECK-SINGLE-SPLIT-FILENAME: "-split-dwarf-output" "{{.*}}foo.o"
 
 // RUN: %clang -target x86_64-macosx -gsplit-dwarf -c -### %s 2> %t
 // RUN: FileCheck -check-prefix=CHECK-NO-ACTIONS < %t %s
@@ -41,7 +41,7 @@
 // RUN: %clang -target amdgcn-amd-amdhsa -gsplit-dwarf -c -### %s 2> %t
 // RUN: FileCheck -check-prefix=CHECK-OPTION < %t %s
 //
-// CHECK-OPTION: "-split-dwarf-file" "split-debug.dwo"
+// CHECK-OPTION: "-split-dwarf-output" "split-debug.dwo"
 
 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -S -### %s 2> %t
 // RUN: FileCheck -check-prefix=CHECK-ASM < %t %s
@@ -58,7 +58,7 @@
 //
 // 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"
 
 // 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-SPLIT-WITH-GMLT: "-enable-split-dwarf"
 // CHECK-SPLIT-WITH-GMLT: "-debug-info-kind=limited"
-// CHECK-SPLIT-WITH-GMLT: "-split-dwarf-file"
+// 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-file"
+// 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"
 
 // 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: "-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"
 
 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -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"
 
 // RUN: %clang -target x86_64-unknown-linux-gnu -g0 -gsplit-dwarf -S -### %s 2> %t
 // RUN: FileCheck -check-prefix=CHECK-SPLIT-OVER-G0 < %t %s
 // 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: "-split-dwarf-file"
+// CHECK-SPLIT-OVER-G0: "-split-dwarf-output"
index ece64cc0ad14cf1635008a935f922d80540831ad..8ba777c8c02ff12167c81ab5b377fbdff3e947ae 100644 (file)
@@ -3,9 +3,9 @@
 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf -c -### %s 2> %t
 // RUN: FileCheck -check-prefix=CHECK-ACTIONS < %t %s
 //
-// CHECK-ACTIONS: "-split-dwarf-file" "split-debug.dwo"
+// CHECK-ACTIONS: "-split-dwarf-output" "split-debug.dwo"
 
-// Check we pass -split-dwarf-file to `as` if -gsplit-dwarf=split.
+// Check we pass -split-dwarf-output to `as` if -gsplit-dwarf=split.
 // RUN: %clang -target x86_64-unknown-linux-gnu -gsplit-dwarf=split -c -### %s 2> %t
 // RUN: FileCheck -check-prefix=CHECK-ACTIONS < %t %s
 
index 0d507b1927d2b355f2daa5c4eb3f2f3907d705e7..ade42c803e4ee50a23238980bce964e463d82391 100644 (file)
@@ -1,5 +1,5 @@
 // REQUIRES: x86-registered-target
-// RUN: %clang -cc1as -triple x86_64-pc-linux-gnu %s -filetype obj -o %t1 -split-dwarf-file %t2
+// RUN: %clang -cc1as -triple x86_64-pc-linux-gnu %s -filetype obj -o %t1 -split-dwarf-output %t2
 // RUN: llvm-objdump -s %t1 | FileCheck --check-prefix=O %s
 // RUN: llvm-objdump -s %t2 | FileCheck --check-prefix=DWO %s
 
index 541c4b7e276c5b2e44eeb330ebee0b82ef289891..77cd5f352bc9c55e2cec6f316862c1f5823691ed 100644 (file)
@@ -17,4 +17,4 @@
 
 // RUN: not llvm-objdump --section-headers %t-raw/DependsOnModule.pcm
 
-// RUN: %clang_cc1 -split-dwarf-file t-split.dwo -triple=x86_64-linux-elf -fmodules -fimplicit-module-maps -fdisable-module-hash -fmodules-cache-path=%t-ELF_SPLIT -F %S/Inputs %s -o %t-split.o
+// RUN: %clang_cc1 -split-dwarf-output t-split.dwo -triple=x86_64-linux-elf -fmodules -fimplicit-module-maps -fdisable-module-hash -fmodules-cache-path=%t-ELF_SPLIT -F %S/Inputs %s -o %t-split.o
index c0334609be5f76f1fefde08198a36065dc3d25c2..a2902b6aa926306b3769c6c3bde40b0d542a017a 100644 (file)
@@ -98,7 +98,7 @@ struct AssemblerInvocation {
   llvm::DebugCompressionType CompressDebugSections =
       llvm::DebugCompressionType::None;
   std::string MainFileName;
-  std::string SplitDwarfFile;
+  std::string SplitDwarfOutput;
 
   /// @}
   /// @name Frontend Options
@@ -258,7 +258,7 @@ bool AssemblerInvocation::CreateFromArgs(AssemblerInvocation &Opts,
   }
   Opts.LLVMArgs = Args.getAllArgValues(OPT_mllvm);
   Opts.OutputPath = Args.getLastArgValue(OPT_o);
-  Opts.SplitDwarfFile = Args.getLastArgValue(OPT_split_dwarf_file);
+  Opts.SplitDwarfOutput = Args.getLastArgValue(OPT_split_dwarf_output);
   if (Arg *A = Args.getLastArg(OPT_filetype)) {
     StringRef Name = A->getValue();
     unsigned OutputType = StringSwitch<unsigned>(Name)
@@ -367,8 +367,8 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts,
   if (!FDOS)
     return true;
   std::unique_ptr<raw_fd_ostream> DwoOS;
-  if (!Opts.SplitDwarfFile.empty())
-    DwoOS = getOutputStream(Opts.SplitDwarfFile, Diags, IsBinary);
+  if (!Opts.SplitDwarfOutput.empty())
+    DwoOS = getOutputStream(Opts.SplitDwarfOutput, Diags, IsBinary);
 
   // FIXME: This is not pretty. MCContext has a ptr to MCObjectFileInfo and
   // MCObjectFileInfo needs a MCContext reference in order to initialize itself.
@@ -527,8 +527,8 @@ static bool ExecuteAssembler(AssemblerInvocation &Opts,
   if (Failed) {
     if (Opts.OutputPath != "-")
       sys::fs::remove(Opts.OutputPath);
-    if (!Opts.SplitDwarfFile.empty() && Opts.SplitDwarfFile != "-")
-      sys::fs::remove(Opts.SplitDwarfFile);
+    if (!Opts.SplitDwarfOutput.empty() && Opts.SplitDwarfOutput != "-")
+      sys::fs::remove(Opts.SplitDwarfOutput);
   }
 
   return Failed;