forked from OSchip/llvm-project
parent
7496461f44
commit
1746e37cb8
|
@ -512,13 +512,16 @@ def fzero_initialized_in_bss : Flag<"-fzero-initialized-in-bss">, Group<f_Group>
|
|||
def ffunction_sections: Flag <"-ffunction-sections">, Group<f_Group>;
|
||||
def fdata_sections : Flag <"-fdata-sections">, Group<f_Group>;
|
||||
def f : Joined<"-f">, Group<f_Group>;
|
||||
def g0 : Joined<"-g0">, Group<g_Group>;
|
||||
def g3 : Joined<"-g3">, Group<g_Group>;
|
||||
def gfull : Joined<"-gfull">, Group<g_Group>;
|
||||
def gstabs : Joined<"-gstabs">, Group<g_Group>;
|
||||
def gused : Joined<"-gused">, Group<g_Group>;
|
||||
def g0 : Flag<"-g0">, Group<g_Group>;
|
||||
def g3 : Flag<"-g3">, Group<g_Group>;
|
||||
def gdwarf2 : Flag<"-gdwarf-2">, Group<g_Group>;
|
||||
def gfull : Flag<"-gfull">, Group<g_Group>;
|
||||
def gstabs : Flag<"-gstabs">, Group<g_Group>;
|
||||
def gstabsplus : Flag<"-gstabs+">, Group<g_Group>;
|
||||
def gstabs1 : Flag<"-gstabs1">, Group<g_Group>;
|
||||
def gstabs2 : Flag<"-gstabs2">, Group<g_Group>;
|
||||
def gused : Flag<"-gused">, Group<g_Group>;
|
||||
def g_Flag : Flag<"-g">, Group<g_Group>;
|
||||
def g_Joined : Joined<"-g">, Group<g_Group>;
|
||||
def headerpad__max__install__names : Joined<"-headerpad_max_install_names">;
|
||||
def index_header_map : Flag<"-index-header-map">;
|
||||
def idirafter : JoinedOrSeparate<"-idirafter">, Group<clang_i_Group>;
|
||||
|
|
|
@ -1458,22 +1458,7 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA,
|
|||
Args.ClaimAllArgs(options::OPT_g_Group);
|
||||
if (Arg *A = Args.getLastArg(options::OPT_g_Group))
|
||||
if (!A->getOption().matches(options::OPT_g0)) {
|
||||
const std::string &ArgString = A->getAsString(Args);
|
||||
bool Valid_g = llvm::StringSwitch<bool>(ArgString)
|
||||
.Case("-g", true)
|
||||
.Case("-g3", true)
|
||||
.Case("-gdwarf-2", true)
|
||||
.Case("-gstabs", true)
|
||||
.Case("-gstabs+", true)
|
||||
.Case("-gstabs1", true)
|
||||
.Case("-gstabs2", true)
|
||||
.Case("-gfull", true)
|
||||
.Case("-gused", true)
|
||||
.Default(false);
|
||||
if (Valid_g)
|
||||
CmdArgs.push_back("-g");
|
||||
else
|
||||
D.Diag(diag::warn_drv_clang_unsupported) << ArgString;
|
||||
}
|
||||
|
||||
Args.AddAllArgs(CmdArgs, options::OPT_ffunction_sections);
|
||||
|
|
Loading…
Reference in New Issue