mirror of
https://github.com/llvm/llvm-project.git
synced 2025-04-29 20:46:06 +00:00
Driver support for -fdebug-types-sections
Using backend-option like a few other debug codegen flags. I believe Eric Christopher's working at porting those over to something nicer such as an API level CodeGenOptions or the like, so this can be improved along with that work. llvm-svn: 199535
This commit is contained in:
parent
6826d22784
commit
d74be70aba
@ -2599,7 +2599,10 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||||||
CmdArgs.push_back("-generate-gnu-dwarf-pub-sections");
|
CmdArgs.push_back("-generate-gnu-dwarf-pub-sections");
|
||||||
}
|
}
|
||||||
|
|
||||||
Args.AddAllArgs(CmdArgs, options::OPT_fdebug_types_section);
|
if (Args.hasArg(options::OPT_fdebug_types_section)) {
|
||||||
|
CmdArgs.push_back("-backend-option");
|
||||||
|
CmdArgs.push_back("-generate-type-units");
|
||||||
|
}
|
||||||
|
|
||||||
Args.AddAllArgs(CmdArgs, options::OPT_ffunction_sections);
|
Args.AddAllArgs(CmdArgs, options::OPT_ffunction_sections);
|
||||||
Args.AddAllArgs(CmdArgs, options::OPT_fdata_sections);
|
Args.AddAllArgs(CmdArgs, options::OPT_fdata_sections);
|
||||||
|
@ -45,12 +45,14 @@
|
|||||||
// RUN: | FileCheck -check-prefix=GLTO_NO %s
|
// RUN: | FileCheck -check-prefix=GLTO_NO %s
|
||||||
//
|
//
|
||||||
// RUN: %clang -### -c -grecord-gcc-switches -gno-record-gcc-switches \
|
// RUN: %clang -### -c -grecord-gcc-switches -gno-record-gcc-switches \
|
||||||
// RUN: -gstrict-dwarf -gno-strict-dwarf -fdebug-types-section \
|
// RUN: -gstrict-dwarf -gno-strict-dwarf %s 2>&1 \
|
||||||
// RUN: -fno-debug-types-section %s 2>&1 \
|
|
||||||
// RUN: | FileCheck -check-prefix=GIGNORE %s
|
// RUN: | FileCheck -check-prefix=GIGNORE %s
|
||||||
//
|
//
|
||||||
// RUN: %clang -### -c -ggnu-pubnames %s 2>&1 | FileCheck -check-prefix=GOPT %s
|
// RUN: %clang -### -c -ggnu-pubnames %s 2>&1 | FileCheck -check-prefix=GOPT %s
|
||||||
//
|
//
|
||||||
|
// RUN: %clang -### -fdebug-types-section %s 2>&1 \
|
||||||
|
// RUN: | FileCheck -check-prefix=FDTS %s
|
||||||
|
//
|
||||||
// G: "-cc1"
|
// G: "-cc1"
|
||||||
// G: "-g"
|
// G: "-g"
|
||||||
//
|
//
|
||||||
@ -90,3 +92,5 @@
|
|||||||
// GIGNORE-NOT: "argument unused during compilation"
|
// GIGNORE-NOT: "argument unused during compilation"
|
||||||
//
|
//
|
||||||
// GOPT: -generate-gnu-dwarf-pub-sections
|
// GOPT: -generate-gnu-dwarf-pub-sections
|
||||||
|
//
|
||||||
|
// FDTS: "-backend-option" "-generate-type-units"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user