[clang] [clang][bytecode] Print field descriptor in Pointer::print() (PR #168002)
via cfe-commits
cfe-commits at lists.llvm.org
Thu Nov 13 18:51:04 PST 2025
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-clang
Author: Timm Baeder (tbaederr)
<details>
<summary>Changes</summary>
This is almost always useful information and ::print() is debug-only code.
---
Full diff: https://github.com/llvm/llvm-project/pull/168002.diff
1 Files Affected:
- (modified) clang/lib/AST/ByteCode/Pointer.h (+3)
``````````diff
diff --git a/clang/lib/AST/ByteCode/Pointer.h b/clang/lib/AST/ByteCode/Pointer.h
index cd738ce8b2a3e..6efec48df71cb 100644
--- a/clang/lib/AST/ByteCode/Pointer.h
+++ b/clang/lib/AST/ByteCode/Pointer.h
@@ -830,6 +830,9 @@ class Pointer {
inline llvm::raw_ostream &operator<<(llvm::raw_ostream &OS, const Pointer &P) {
P.print(OS);
+ OS << ' ';
+ if (const Descriptor *D = P.getFieldDesc())
+ D->dump(OS);
return OS;
}
``````````
</details>
https://github.com/llvm/llvm-project/pull/168002
More information about the cfe-commits
mailing list