[llvm] [LLVM][DebugInfo]Allow ExtraData field to be a node reference (PR #165023)

Laxman Sole via llvm-commits llvm-commits at lists.llvm.org
Thu Oct 30 11:11:33 PDT 2025


================
@@ -959,16 +959,29 @@ DIType *DIDerivedType::getClassType() const {
   assert(getTag() == dwarf::DW_TAG_ptr_to_member_type);
   return cast_or_null<DIType>(getExtraData());
 }
+
+// Helper function to extract ConstantAsMetadata from ExtraData,
+// handling extra data MDTuple unwrapping if needed.
+static ConstantAsMetadata *extractConstantMetadata(Metadata *ExtraData) {
+  Metadata *ED = ExtraData;
+  while (auto *Tuple = dyn_cast_or_null<MDTuple>(ED)) {
----------------
laxmansole wrote:

Nested tuples are not required for this change. I'll modify the code and keep it simple.

https://github.com/llvm/llvm-project/pull/165023


More information about the llvm-commits mailing list