OSDN Git Service

For Marcus - Implement sync primitives inline for ARM.
[pf3gnuchains/gcc-fork.git] / gcc / opt-functions.awk
index f5b485a..01a06e8 100644 (file)
@@ -78,6 +78,9 @@ function switch_flags (flags)
        result = result \
          test_flag("Common", flags, " | CL_COMMON") \
          test_flag("Target", flags, " | CL_TARGET") \
+         test_flag("Driver", flags, " | CL_DRIVER") \
+         test_flag("RejectDriver", flags, " | CL_REJECT_DRIVER") \
+         test_flag("NoDriverArg", flags, " | CL_NO_DRIVER_ARG") \
          test_flag("Save", flags, " | CL_SAVE") \
          test_flag("Joined", flags, " | CL_JOINED") \
          test_flag("JoinedOrMissing", flags, " | CL_JOINED | CL_MISSING_OK") \
@@ -128,7 +131,7 @@ function static_var(name, flags)
 # Return the type of variable that should be associated with the given flags.
 function var_type(flags)
 {
-       if (!flag_set_p("Joined.*", flags))
+       if (!flag_set_p("Joined.*", flags) && !flag_set_p("Separate", flags))
                return "int "
        else if (flag_set_p("UInteger", flags))
                return "int "
@@ -143,7 +146,7 @@ function var_type_struct(flags)
 {
        if (flag_set_p("UInteger", flags))
                return "int "
-       else if (!flag_set_p("Joined.*", flags)) {
+       else if (!flag_set_p("Joined.*", flags) && !flag_set_p("Separate", flags)) {
                if (flag_set_p(".*Mask.*", flags))
                        return "int "
                else
@@ -194,3 +197,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)
+}