DefaultStringValue<"">,
Desc<"A list containing all the arguments to be passed to the executable when it is run. Note that this does NOT include the argv[0] which is in target.arg0.">;
def EnvVars: Property<"env-vars", "Dictionary">,
- DefaultUnsignedValue<16>,
+ ElementType<"String">,
Desc<"A list of all the environment variables to be passed to the executable's environment, and their values.">;
def InheritEnv: Property<"inherit-env", "Boolean">,
DefaultTrue,
Desc<"Expressions that crash will show up in crash logs if the host system supports executable specific crash log strings and this setting is set to true.">;
def TrapHandlerNames: Property<"trap-handler-names", "Array">,
Global,
- DefaultUnsignedValue<16>,
+ ElementType<"String">,
Desc<"A list of trap handler function names, e.g. a common Unix user process one is _sigtramp.">;
def DisplayRuntimeSupportValues: Property<"display-runtime-support-values", "Boolean">,
DefaultFalse,
DefaultFalse,
Desc<"Disable reading and caching of memory in fixed-size units.">;
def ExtraStartCommand: Property<"extra-startup-command", "Array">,
- DefaultUnsignedValue<16>,
+ ElementType<"String">,
Desc<"A list containing extra commands understood by the particular process plugin used. For instance, to turn on debugserver logging set this to 'QSetLogging:bitmask=LOG_DEFAULT;'">;
def IgnoreBreakpointsInExpressions: Property<"ignore-breakpoints-in-expressions", "Boolean">,
Global,
OS << ", ";
// Emit the property type.
+ llvm::StringRef type = Property->getValueAsString("Type");
OS << "OptionValue::eType";
- OS << Property->getValueAsString("Type");
+ OS << type;
OS << ", ";
// Emit the property's global value.
bool hasDefaultUnsignedValue = Property->getValue("HasDefaultUnsignedValue");
bool hasDefaultEnumValue = Property->getValue("HasDefaultEnumValue");
bool hasDefaultStringValue = Property->getValue("HasDefaultStringValue");
+ bool hasElementType = Property->getValue("HasElementType");
// Guarantee that every property has a default value.
assert((hasDefaultUnsignedValue || hasDefaultEnumValue ||
- hasDefaultStringValue) &&
- "Property must have a default value");
+ hasDefaultStringValue || hasElementType) &&
+ "Property must have a default value or an element type");
// Guarantee that no property has both a default unsigned value and a default
// enum value, since they're bothed stored in the same field.
!(Property->getValueAsString("Type") == "Enum" && !hasDefaultEnumValue) &&
"Enum property must have a enum default value.");
+ // Guarantee that only arrays and dictionaries have an element type;
+ assert(((type != "Array" && type != "Dictionary") || hasElementType) &&
+ "Only dictionaries and arrays can have an element type.");
+
// Emit the default uint value.
if (hasDefaultUnsignedValue) {
OS << std::to_string(Property->getValueAsInt("DefaultUnsignedValue"));
} else if (hasDefaultEnumValue) {
OS << Property->getValueAsString("DefaultEnumValue");
+ } else if (hasElementType) {
+ OS << "OptionValue::eType";
+ OS << Property->getValueAsString("ElementType");
} else {
OS << "0";
}