/// 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;
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">;
}
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;
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;
}
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;
}
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) {
CGOpts.DwarfDebugFlags, RuntimeVers,
(CGOpts.getSplitDwarfMode() != CodeGenOptions::NoFission)
? ""
- : CGOpts.SplitDwarfFile,
+ : CGOpts.SplitDwarfOutput,
EmissionKind, DwoId, CGOpts.SplitDwarfInlining,
CGOpts.DebugInfoForProfiling,
CGM.getTarget().getTriple().isNVPTX()
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);
}
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));
}
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 =
// 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) {
// 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
// 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
// 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"
// 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
// 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
//
// 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"
// 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
// 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
// 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
llvm::DebugCompressionType CompressDebugSections =
llvm::DebugCompressionType::None;
std::string MainFileName;
- std::string SplitDwarfFile;
+ std::string SplitDwarfOutput;
/// @}
/// @name Frontend Options
}
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)
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.
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;