[Lldb-commits] [PATCH] D69451: Inline variable only used in assertion

Shu-Chun Weng via Phabricator via lldb-commits lldb-commits at lists.llvm.org
Fri Oct 25 15:06:33 PDT 2019


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.


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D69451.226503.patch
Type: text/x-patch
Size: 1069 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20191025/738db68d/attachment.bin>


More information about the lldb-commits mailing list