From 5d4c1c00e6bbd0694231b0350b886aa9d32ca573 Mon Sep 17 00:00:00 2001 From: David Blaikie Date: Sun, 22 Mar 2020 18:17:53 -0700 Subject: [PATCH] Roll an expression into an assert to remove the need for a (void) cast. --- llvm/lib/DebugInfo/CodeView/TypeStreamMerger.cpp | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/llvm/lib/DebugInfo/CodeView/TypeStreamMerger.cpp b/llvm/lib/DebugInfo/CodeView/TypeStreamMerger.cpp index 45b462378cbb..8c4b640bcd19 100644 --- a/llvm/lib/DebugInfo/CodeView/TypeStreamMerger.cpp +++ b/llvm/lib/DebugInfo/CodeView/TypeStreamMerger.cpp @@ -389,11 +389,9 @@ ArrayRef TypeStreamMerger::remapIndices(const CVType &OriginalType, MutableArrayRef 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 Refs; discoverTypeIndices(OriginalType.RecordData, Refs);