[clang] c73c3d8 - [clang][bytecode][NFC] Remove unused `Block::getMetadataSize()` (#238031)
via cfe-commits
cfe-commits at lists.llvm.org
Mon Nov 2 22:00:35 PST 2026
Author: Timm Baeder
Date: 2026-11-03T07:00:30+01:00
New Revision: c73c3d82c05d702700359030b37f51e403988e99
URL: https://github.com/llvm/llvm-project/commit/c73c3d82c05d702700359030b37f51e403988e99
DIFF: https://github.com/llvm/llvm-project/commit/c73c3d82c05d702700359030b37f51e403988e99.diff
LOG: [clang][bytecode][NFC] Remove unused `Block::getMetadataSize()` (#238031)
Added:
Modified:
clang/lib/AST/ByteCode/Block.h
Removed:
################################################################################
diff --git a/clang/lib/AST/ByteCode/Block.h b/clang/lib/AST/ByteCode/Block.h
index 36037e1afda91..29c291a9d9a63 100644
--- a/clang/lib/AST/ByteCode/Block.h
+++ b/clang/lib/AST/ByteCode/Block.h
@@ -110,8 +110,6 @@ class Block final {
unsigned getSize() const { return DescSize; }
/// Returns the size of the block, including metadata.
unsigned getAllocSize() const { return DescSize + MDSize; }
- /// Returns the size of the metadata.
- unsigned getMetadataSize() const { return MDSize; }
/// Returns the declaration ID.
UnsignedOrNone getDeclID() const { return DeclID; }
/// Returns whether the data of this block has been initialized via
@@ -144,7 +142,7 @@ class Block final {
template <typename T> T &deref() { return *reinterpret_cast<T *>(data()); }
template <typename T> T &getBlockDesc() {
- assert(sizeof(T) == getMetadataSize());
+ assert(sizeof(T) == getMetadataSize(Kind));
if constexpr (std::is_same_v<T, GlobalInlineDescriptor>)
assert(Kind == Global);
More information about the cfe-commits
mailing list