[clang] [clang][bytecode] Print array size in `Descriptor::dump()` (PR #195625)
via cfe-commits
cfe-commits at lists.llvm.org
Mon May 4 03:03:56 PDT 2026
llvmorg-github-actions[bot] wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Timm Baeder (tbaederr)
<details>
<summary>Changes</summary>
And the element type for primitive arrays
---
Full diff: https://github.com/llvm/llvm-project/pull/195625.diff
1 Files Affected:
- (modified) clang/lib/AST/ByteCode/Disasm.cpp (+3-2)
``````````diff
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())
``````````
</details>
https://github.com/llvm/llvm-project/pull/195625
More information about the cfe-commits
mailing list