Roll an expression into an assert to remove the need for a (void) cast.
authorDavid Blaikie <dblaikie@gmail.com>
Mon, 23 Mar 2020 01:17:53 +0000 (18:17 -0700)
committerDavid Blaikie <dblaikie@gmail.com>
Mon, 23 Mar 2020 01:18:27 +0000 (18:18 -0700)
llvm/lib/DebugInfo/CodeView/TypeStreamMerger.cpp

index 45b4623..8c4b640 100644 (file)
@@ -389,11 +389,9 @@ ArrayRef<uint8_t>
 TypeStreamMerger::remapIndices(const CVType &OriginalType,
                                MutableArrayRef<uint8_t> Storage) {
   unsigned Align = OriginalType.RecordData.size() & 3;
-  unsigned AlignedSize = alignTo(OriginalType.RecordData.size(), 4);
-  assert(Storage.size() == AlignedSize &&
+  assert(Storage.size() == alignTo(OriginalType.RecordData.size(), 4) &&
          "The storage buffer size is not a multiple of 4 bytes which will "
          "cause misalignment in the output TPI stream!");
-  (void)AlignedSize;
 
   SmallVector<TiReference, 4> Refs;
   discoverTypeIndices(OriginalType.RecordData, Refs);