[Mlir-commits] [mlir] [MLIR][LLVM] Support Recursive DITypes (PR #80251)
Billy Zhu
llvmlistbot at llvm.org
Thu Feb 29 22:01:10 PST 2024
================
@@ -179,14 +174,14 @@ DISubprogramAttr DebugImporter::translateImpl(llvm::DISubprogram *node) {
// Only definitions require a distinct identifier.
mlir::DistinctAttr id;
if (node->isDistinct())
- id = DistinctAttr::create(UnitAttr::get(context));
+ id = getOrCreateDistinctID(node);
std::optional<DISubprogramFlags> subprogramFlags =
symbolizeDISubprogramFlags(node->getSubprogram()->getSPFlags());
- // Return nullptr if the scope or type is a cyclic dependency.
- DIScopeAttr scope = translate(node->getScope());
+ // Return nullptr if the scope or type is invalid.
+ DIScopeAttr scope = cast<DIScopeAttr>(translate(node->getScope()));
----------------
zyx-billy wrote:
oh you're right, the cast isn't needed now (I went through a few iterations so this was probably left over 😂 )
https://github.com/llvm/llvm-project/pull/80251
More information about the Mlir-commits
mailing list