opt-functions.awk (opt_sanitized_name): New.
2010-04-13 Manuel López-Ibáñez <manu@gcc.gnu.org> * opt-functions.awk (opt_sanitized_name): New. (opt_enum): New. * optc-gen.awk: Use it * opth-gen.awk: Use it. From-SVN: r158272
This commit is contained in:
parent
0f2ffb9ac5
commit
9db94baaef
|
@ -1,3 +1,10 @@
|
|||
2010-04-13 Manuel López-Ibáñez <manu@gcc.gnu.org>
|
||||
|
||||
* opt-functions.awk (opt_sanitized_name): New.
|
||||
(opt_enum): New.
|
||||
* optc-gen.awk: Use it
|
||||
* opth-gen.awk: Use it.
|
||||
|
||||
2010-04-13 Martin Jambor <mjambor@suse.cz>
|
||||
|
||||
* tree-sra.c (replace_uses_with_default_def_ssa_name): New function.
|
||||
|
|
|
@ -194,3 +194,21 @@ function var_ref(name, flags)
|
|||
return "&target_flags"
|
||||
return "0"
|
||||
}
|
||||
|
||||
# Given the option called NAME return a sanitized version of its name.
|
||||
function opt_sanitized_name(name)
|
||||
{
|
||||
if (name == "finline-limit=" || name == "Wlarger-than=" \
|
||||
|| name == "ftemplate-depth=")
|
||||
name = name "eq"
|
||||
if (name == "gdwarf+")
|
||||
name = "gdwarfplus"
|
||||
gsub ("[^A-Za-z0-9]", "_", name)
|
||||
return name
|
||||
}
|
||||
|
||||
# Given the option called NAME return the appropriate enum for it.
|
||||
function opt_enum(name)
|
||||
{
|
||||
return "OPT_" opt_sanitized_name(name)
|
||||
}
|
||||
|
|
|
@ -170,11 +170,7 @@ for (i = 0; i < n_opts; i++) {
|
|||
}
|
||||
|
||||
len = length (opts[i]);
|
||||
enum = "OPT_" opts[i]
|
||||
if (opts[i] == "finline-limit=" || opts[i] == "Wlarger-than=" \
|
||||
|| opts[i] == "ftemplate-depth=")
|
||||
enum = enum "eq"
|
||||
gsub ("[^A-Za-z0-9]", "_", enum)
|
||||
enum = opt_enum(opts[i])
|
||||
|
||||
# If this switch takes joined arguments, back-chain all
|
||||
# subsequent switches to it for which it is a prefix. If
|
||||
|
|
|
@ -331,13 +331,7 @@ for (i = 0; i < n_opts; i++) {
|
|||
}
|
||||
|
||||
len = length (opts[i]);
|
||||
enum = "OPT_" opts[i]
|
||||
if (opts[i] == "finline-limit=" || opts[i] == "Wlarger-than=" \
|
||||
|| opts[i] == "ftemplate-depth=")
|
||||
enum = enum "eq"
|
||||
if (opts[i] == "gdwarf+")
|
||||
enum = "OPT_gdwarfplus"
|
||||
gsub ("[^A-Za-z0-9]", "_", enum)
|
||||
enum = opt_enum(opts[i])
|
||||
|
||||
# If this switch takes joined arguments, back-chain all
|
||||
# subsequent switches to it for which it is a prefix. If
|
||||
|
|
Loading…
Reference in New Issue