[Mlir-commits] [mlir] [MLIR][LLVM] Support Recursive DITypes (PR #80251)
Tobias Gysi
llvmlistbot at llvm.org
Wed Feb 28 22:32:46 PST 2024
================
@@ -133,15 +130,26 @@ DebugTranslation::translateImpl(DICompositeTypeAttr attr) {
isDistinct = true;
}
- return getDistinctOrUnique<llvm::DICompositeType>(
- isDistinct, llvmCtx, attr.getTag(), getMDStringOrNull(attr.getName()),
- translate(attr.getFile()), attr.getLine(), translate(attr.getScope()),
- translate(attr.getBaseType()), attr.getSizeInBits(),
- attr.getAlignInBits(),
- /*OffsetInBits=*/0,
- /*Flags=*/static_cast<llvm::DINode::DIFlags>(attr.getFlags()),
- llvm::MDNode::get(llvmCtx, elements),
- /*RuntimeLang=*/0, /*VTableHolder=*/nullptr);
+ llvm::DICompositeType *placeholder =
+ getDistinctOrUnique<llvm::DICompositeType>(
+ isDistinct, llvmCtx, attr.getTag(), getMDStringOrNull(attr.getName()),
+ translate(attr.getFile()), attr.getLine(), translate(attr.getScope()),
+ translate(attr.getBaseType()), attr.getSizeInBits(),
+ attr.getAlignInBits(),
+ /*OffsetInBits=*/0,
+ /*Flags=*/static_cast<llvm::DINode::DIFlags>(attr.getFlags()),
+ /*Elements=*/nullptr, /*RuntimeLang=*/0, /*VTableHolder=*/nullptr);
----------------
gysit wrote:
Yeah the temporary prevents uniquing essential. I don't think it is likely to ever hit that case, but if it is painful to debug. Note that the temporary's life time is probably limited to by the scope but that seems fine here.
https://github.com/llvm/llvm-project/pull/80251
More information about the Mlir-commits
mailing list