diff options
author | Martin Liska <mliska@suse.cz> | 2020-05-05 16:13:46 +0200 |
---|---|---|
committer | Martin Liska <mliska@suse.cz> | 2020-05-05 16:13:46 +0200 |
commit | 2d8a60a63cafdd9930bdbfb2ec76c47d7d14cd45 (patch) | |
tree | 97f2d4fee31df31fd402980aca805bdab64a21e6 /gcc/opt-read.awk | |
parent | 0f62caf58b5d11f375f789385d6d49891ebd9a94 (diff) | |
download | gcc-2d8a60a63cafdd9930bdbfb2ec76c47d7d14cd45.zip gcc-2d8a60a63cafdd9930bdbfb2ec76c47d7d14cd45.tar.gz gcc-2d8a60a63cafdd9930bdbfb2ec76c47d7d14cd45.tar.bz2 |
optgen: make more sanity checks for enums.
* opt-functions.awk (opt_args_non_empty): New function.
* opt-read.awk: Use the function for various option arguments.
Diffstat (limited to 'gcc/opt-read.awk')
-rw-r--r-- | gcc/opt-read.awk | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/gcc/opt-read.awk b/gcc/opt-read.awk index a2e16f2..9bb9dfc 100644 --- a/gcc/opt-read.awk +++ b/gcc/opt-read.awk @@ -81,8 +81,8 @@ BEGIN { } else if ($1 == "Enum") { props = $2 - name = opt_args("Name", props) - type = opt_args("Type", props) + name = opt_args_non_empty("Name", props) + type = opt_args_non_empty("Type", props) unknown_error = opt_args("UnknownError", props) enum_names[n_enums] = name enum_type[name] = type @@ -93,9 +93,9 @@ BEGIN { } else if ($1 == "EnumValue") { props = $2 - enum_name = opt_args("Enum", props) - string = opt_args("String", props) - value = opt_args("Value", props) + enum_name = opt_args_non_empty("Enum", props) + string = opt_args_non_empty("String", props) + value = opt_args_non_empty("Value", props) val_flags = "0" val_flags = val_flags \ test_flag("Canonical", props, "| CL_ENUM_CANONICAL") \ |