[clang] [clang][bytecode] Print array size in `Descriptor::dump()` (PR #195625)
Timm Baeder via cfe-commits
cfe-commits at lists.llvm.org
Mon May 4 03:03:10 PDT 2026
https://github.com/tbaederr created https://github.com/llvm/llvm-project/pull/195625
And the element type for primitive arrays
>From 59638ea30749fd1c0742a8a485f659fc91ce3f81 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Timm=20B=C3=A4der?= <tbaeder at redhat.com>
Date: Mon, 4 May 2026 12:01:08 +0200
Subject: [PATCH] [clang][bytecode] Print array size in `Descriptor::dump()`
And the element type for primitive arrays
---
clang/lib/AST/ByteCode/Disasm.cpp | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
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