scw created this revision. scw added a reviewer: JDevlieghere. Herald added a project: LLDB. Herald added a subscriber: lldb-commits.
This prevents unused variable warning/error in -DNDEBUG builds. The variable was introduced in rG5934cd11ea3e <https://reviews.llvm.org/rG5934cd11ea3e15dd9f13a9ee960012b5b64463ec>. Repository: rG LLVM Github Monorepo https://reviews.llvm.org/D69451 Files: lldb/utils/TableGen/LLDBPropertyDefEmitter.cpp Index: lldb/utils/TableGen/LLDBPropertyDefEmitter.cpp =================================================================== --- lldb/utils/TableGen/LLDBPropertyDefEmitter.cpp +++ lldb/utils/TableGen/LLDBPropertyDefEmitter.cpp @@ -46,7 +46,6 @@ bool hasDefaultUnsignedValue = Property->getValue("HasDefaultUnsignedValue"); bool hasDefaultEnumValue = Property->getValue("HasDefaultEnumValue"); bool hasDefaultStringValue = Property->getValue("HasDefaultStringValue"); - bool hasDefaultBooleanValue = Property->getValue("HasDefaultBooleanValue"); // Guarantee that every property has a default value. assert((hasDefaultUnsignedValue || hasDefaultEnumValue || @@ -60,7 +59,7 @@ // Guarantee that every boolean property has a boolean default value. assert(!(Property->getValueAsString("Type") == "Boolean" && - !hasDefaultBooleanValue) && + !Property->getValue("HasDefaultBooleanValue")) && "Boolean property must have a boolean default value."); // Guarantee that every string property has a string default value.
Index: lldb/utils/TableGen/LLDBPropertyDefEmitter.cpp =================================================================== --- lldb/utils/TableGen/LLDBPropertyDefEmitter.cpp +++ lldb/utils/TableGen/LLDBPropertyDefEmitter.cpp @@ -46,7 +46,6 @@ bool hasDefaultUnsignedValue = Property->getValue("HasDefaultUnsignedValue"); bool hasDefaultEnumValue = Property->getValue("HasDefaultEnumValue"); bool hasDefaultStringValue = Property->getValue("HasDefaultStringValue"); - bool hasDefaultBooleanValue = Property->getValue("HasDefaultBooleanValue"); // Guarantee that every property has a default value. assert((hasDefaultUnsignedValue || hasDefaultEnumValue || @@ -60,7 +59,7 @@ // Guarantee that every boolean property has a boolean default value. assert(!(Property->getValueAsString("Type") == "Boolean" && - !hasDefaultBooleanValue) && + !Property->getValue("HasDefaultBooleanValue")) && "Boolean property must have a boolean default value."); // Guarantee that every string property has a string default value.
_______________________________________________ lldb-commits mailing list lldb-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/lldb-commits