[Lldb-commits] [lldb] 91098fe - [lldb][AArch64] Use macro for unused var without asserts enabled

David Spickett via lldb-commits lldb-commits at lists.llvm.org
Mon Jul 25 08:16:42 PDT 2022


Author: David Spickett
Date: 2022-07-25T15:14:49Z
New Revision: 91098fec960f501c95c6ecdede604484750367e4

URL: https://github.com/llvm/llvm-project/commit/91098fec960f501c95c6ecdede604484750367e4
DIFF: https://github.com/llvm/llvm-project/commit/91098fec960f501c95c6ecdede604484750367e4.diff

LOG: [lldb][AArch64] Use macro for unused var without asserts enabled

82d4f39f342165a92eaa1fe74488158942cf27b4 marked an unused
var of mine (thanks Dmitri Gribenko!). Which reminded me lldb has
a macro just for that purpose.

Added: 
    

Modified: 
    lldb/source/Plugins/Process/Utility/MemoryTagManagerAArch64MTE.cpp

Removed: 
    


################################################################################
diff  --git a/lldb/source/Plugins/Process/Utility/MemoryTagManagerAArch64MTE.cpp b/lldb/source/Plugins/Process/Utility/MemoryTagManagerAArch64MTE.cpp
index dbd36fbcb212..7e25bc4ea2a2 100644
--- a/lldb/source/Plugins/Process/Utility/MemoryTagManagerAArch64MTE.cpp
+++ b/lldb/source/Plugins/Process/Utility/MemoryTagManagerAArch64MTE.cpp
@@ -290,7 +290,7 @@ MemoryTagManagerAArch64MTE::UnpackTagsFromCoreFileSegment(
   const size_t bytes_copied =
       reader(tag_segment_data_address + file_offset_in_bytes, tag_bytes_to_read,
              tag_data.data());
-  (void)bytes_copied;
+  UNUSED_IF_ASSERT_DISABLED(bytes_copied);
   assert(bytes_copied == tag_bytes_to_read);
 
   std::vector<lldb::addr_t> tags;


        


More information about the lldb-commits mailing list