forked from OSchip/llvm-project
Driver: support -fno-debug-types-section to override -fdebug-types-section
llvm-svn: 200236
This commit is contained in:
parent
924eb2afdc
commit
f36d9bac47
|
@ -873,6 +873,8 @@ def fno_data_sections : Flag <["-"], "fno-data-sections">, Group<f_Group>,
|
|||
Flags<[CC1Option]>;
|
||||
def fdebug_types_section: Flag <["-"], "fdebug-types-section">, Group<f_Group>,
|
||||
Flags<[CC1Option]>, HelpText<"Place debug types in their own section (ELF Only)">;
|
||||
def fno_debug_types_section: Flag<["-"], "fno-debug-types-section">, Group<f_Group>,
|
||||
Flags<[CC1Option]>;
|
||||
def g_Flag : Flag<["-"], "g">, Group<g_Group>,
|
||||
HelpText<"Generate source level debug information">, Flags<[CC1Option]>;
|
||||
def gline_tables_only : Flag<["-"], "gline-tables-only">, Group<g_Group>,
|
||||
|
|
|
@ -2606,7 +2606,8 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
CmdArgs.push_back("-generate-gnu-dwarf-pub-sections");
|
||||
}
|
||||
|
||||
if (Args.hasArg(options::OPT_fdebug_types_section)) {
|
||||
if (Args.hasFlag(options::OPT_fdebug_types_section,
|
||||
options::OPT_fno_debug_types_section, false)) {
|
||||
CmdArgs.push_back("-backend-option");
|
||||
CmdArgs.push_back("-generate-type-units");
|
||||
}
|
||||
|
|
|
@ -53,6 +53,10 @@
|
|||
// RUN: %clang -### -fdebug-types-section %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=FDTS %s
|
||||
//
|
||||
// RUN: %clang -### -fdebug-types-section -fno-debug-types-section %s 2>&1 \
|
||||
// RUN: | FileCheck -check-prefix=NOFDTS %s
|
||||
//
|
||||
//
|
||||
// G: "-cc1"
|
||||
// G: "-g"
|
||||
//
|
||||
|
@ -94,3 +98,5 @@
|
|||
// GOPT: -generate-gnu-dwarf-pub-sections
|
||||
//
|
||||
// FDTS: "-backend-option" "-generate-type-units"
|
||||
//
|
||||
// NOFDTS-NOT: "-backend-option" "-generate-type-units"
|
||||
|
|
Loading…
Reference in New Issue