[clang] 2b46fd5 - [clang][bytecode] Print array size in `Descriptor::dump()` (#195625)
via cfe-commits
cfe-commits at lists.llvm.org
Mon May 4 06:23:39 PDT 2026
Author: Timm Baeder
Date: 2026-05-04T15:23:34+02:00
New Revision: 2b46fd5f6ed99631e7cb122e5752d51d117ec2df
URL: https://github.com/llvm/llvm-project/commit/2b46fd5f6ed99631e7cb122e5752d51d117ec2df
DIFF: https://github.com/llvm/llvm-project/commit/2b46fd5f6ed99631e7cb122e5752d51d117ec2df.diff
LOG: [clang][bytecode] Print array size in `Descriptor::dump()` (#195625)
And the element type for primitive arrays
Added:
Modified:
clang/lib/AST/ByteCode/Disasm.cpp
Removed:
################################################################################
diff --git a/clang/lib/AST/ByteCode/Disasm.cpp b/clang/lib/AST/ByteCode/Disasm.cpp
index fc0e391e44010..36a94dd937011 100644
--- a/clang/lib/AST/ByteCode/Disasm.cpp
+++ b/clang/lib/AST/ByteCode/Disasm.cpp
@@ -447,9 +447,10 @@ LLVM_DUMP_METHOD void Descriptor::dump(llvm::raw_ostream &OS) const {
// Print a few interesting bits about the descriptor.
if (isPrimitiveArray())
- OS << " primitive-array";
+ OS << " primitive-array " << getNumElems() << ' '
+ << primTypeToString(getPrimType());
else if (isCompositeArray())
- OS << " composite-array";
+ OS << " composite-array " << getNumElems();
else if (isUnion())
OS << " union(" << ElemRecord->getName() << ")";
else if (isRecord())
More information about the cfe-commits
mailing list