[llvm] 5d4c1c0 - Roll an expression into an assert to remove the need for a (void) cast.
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Sun Mar 22 18:42:14 PDT 2020
Author: David Blaikie
Date: 2020-03-22T18:18:27-07:00
New Revision: 5d4c1c00e6bbd0694231b0350b886aa9d32ca573
URL: https://github.com/llvm/llvm-project/commit/5d4c1c00e6bbd0694231b0350b886aa9d32ca573
DIFF: https://github.com/llvm/llvm-project/commit/5d4c1c00e6bbd0694231b0350b886aa9d32ca573.diff
LOG: Roll an expression into an assert to remove the need for a (void) cast.
Added:
Modified:
llvm/lib/DebugInfo/CodeView/TypeStreamMerger.cpp
Removed:
################################################################################
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<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);
More information about the llvm-commits
mailing list