Lines Matching full:property

24 static void emitPropertyEnum(Record *Property, raw_ostream &OS) {  in emitPropertyEnum()  argument
26 OS << Property->getName(); in emitPropertyEnum()
30 static void emitProperty(Record *Property, raw_ostream &OS) { in emitProperty() argument
33 // Emit the property name. in emitProperty()
34 OS << "\"" << Property->getValueAsString("Name") << "\""; in emitProperty()
37 // Emit the property type. in emitProperty()
38 llvm::StringRef type = Property->getValueAsString("Type"); in emitProperty()
43 // Emit the property's global value. in emitProperty()
44 OS << (Property->getValue("Global") ? "true" : "false"); in emitProperty()
47 bool hasDefaultUnsignedValue = Property->getValue("HasDefaultUnsignedValue"); in emitProperty()
48 bool hasDefaultEnumValue = Property->getValue("HasDefaultEnumValue"); in emitProperty()
49 bool hasDefaultStringValue = Property->getValue("HasDefaultStringValue"); in emitProperty()
50 bool hasElementType = Property->getValue("HasElementType"); in emitProperty()
52 // Guarantee that every property has a default value. in emitProperty()
55 "Property must have a default value or an element type"); in emitProperty()
57 // Guarantee that no property has both a default unsigned value and a default in emitProperty()
60 "Property cannot have both a unsigned and enum default value."); in emitProperty()
62 // Guarantee that every boolean property has a boolean default value. in emitProperty()
63 assert(!(Property->getValueAsString("Type") == "Boolean" && in emitProperty()
64 !Property->getValue("HasDefaultBooleanValue")) && in emitProperty()
65 "Boolean property must have a boolean default value."); in emitProperty()
67 // Guarantee that every string property has a string default value. in emitProperty()
68 assert(!(Property->getValueAsString("Type") == "String" && in emitProperty()
70 "String property must have a string default value."); in emitProperty()
72 // Guarantee that every enum property has an enum default value. in emitProperty()
74 !(Property->getValueAsString("Type") == "Enum" && !hasDefaultEnumValue) && in emitProperty()
75 "Enum property must have a enum default value."); in emitProperty()
83 OS << std::to_string(Property->getValueAsInt("DefaultUnsignedValue")); in emitProperty()
85 OS << Property->getValueAsString("DefaultEnumValue"); in emitProperty()
88 OS << Property->getValueAsString("ElementType"); in emitProperty()
96 if (auto D = Property->getValue("DefaultStringValue")) { in emitProperty()
109 if (Property->getValue("EnumValues")) in emitProperty()
110 OS << Property->getValueAsString("EnumValues"); in emitProperty()
115 // Emit the property description. in emitProperty()
116 if (auto D = Property->getValue("Description")) { in emitProperty()
127 /// Emits all property initializers to the raw_ostream.
138 OS << "// Property definitions for " << PropertyName << "\n"; in emityProperties()
147 OS << "#endif // " << PropertyName << " Property\n\n"; in emityProperties()
150 /// Emits all property initializers to the raw_ostream.
161 OS << "// Property enum cases for " << PropertyName << "\n"; in emitPropertyEnum()
167 OS << "#endif // " << PropertyName << " Property\n\n"; in emitPropertyEnum()
171 emitSourceFileHeader("Property definitions for LLDB.", OS, Records); in EmitPropertyDefs()
174 Records.getAllDerivedDefinitions("Property"); in EmitPropertyDefs()
182 emitSourceFileHeader("Property definition enum for LLDB.", OS, Records); in EmitPropertyEnumDefs()
185 Records.getAllDerivedDefinitions("Property"); in EmitPropertyEnumDefs()