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