OSDN Git Service

* doc/options.texi (Enum, EnumValue): Document new record types.
[pf3gnuchains/gcc-fork.git] / gcc / opth-gen.awk
index 9fafb99..db32121 100644 (file)
@@ -77,6 +77,31 @@ BEGIN {
                else if ($1 == "SourceInclude")  {
                        extra_c_includes[n_extra_c_includes++] = $2;
                }
+               else if ($1 == "Enum")  {
+                       props = $2
+                       name = opt_args("Name", props)
+                       type = opt_args("Type", props)
+                       unknown_error = opt_args("UnknownError", props)
+                       enum_names[n_enums] = name
+                       enum_type[name] = type
+                       enum_index[name] = n_enums
+                       enum_unknown_error[name] = unknown_error
+                       enum_help[name] = $3
+                       n_enums++
+               }
+               else if ($1 == "EnumValue")  {
+                       props = $2
+                       enum_name = opt_args("Enum", props)
+                       string = opt_args("String", props)
+                       value = opt_args("Value", props)
+                       val_flags = "0"
+                       val_flags = val_flags \
+                         test_flag("Canonical", props, "| CL_ENUM_CANONICAL") \
+                         test_flag("DriverOnly", props, "| CL_ENUM_DRIVER_ONLY")
+                       enum_data[enum_name] = enum_data[enum_name] \
+                         "  { " quote string quote ", " value ", " val_flags \
+                         " },\n"
+               }
                else {
                        name = opt_args("Mask", $1)
                        if (name == "") {