[Mlir-commits] [mlir] [mlir][debug] Make DICompileUnitAttr recursive. (PR #190808)
Abid Qadeer
llvmlistbot at llvm.org
Wed Apr 8 14:31:42 PDT 2026
================
@@ -330,6 +330,29 @@ DICompositeTypeAttr::getRecSelf(DistinctAttr recId) {
{}, {}, {});
}
+//===----------------------------------------------------------------------===//
+// DICompileUnitAttr
+//===----------------------------------------------------------------------===//
+
+DIRecursiveTypeAttrInterface DICompileUnitAttr::withRecId(DistinctAttr recId) {
+ return DICompileUnitAttr::get(
+ getContext(), recId, getIsRecSelf(), getId(), getSourceLanguage(),
+ getFile(), getProducer(), getIsOptimized(), getEmissionKind(),
+ getIsDebugInfoForProfiling(), getNameTableKind(), getSplitDebugFilename(),
+ getImportedEntities());
+}
+
+DIRecursiveTypeAttrInterface DICompileUnitAttr::getRecSelf(DistinctAttr recId) {
+ MLIRContext *ctx = recId.getContext();
+ auto emptyStr = StringAttr::get(ctx, "");
+ return DICompileUnitAttr::get(
+ ctx, recId, /*isRecSelf=*/true, /*id=*/DistinctAttr{},
+ llvm::dwarf::DW_LANG_C89, DIFileAttr::get(ctx, "<rec>", ""), emptyStr,
----------------
abidh wrote:
Done.
https://github.com/llvm/llvm-project/pull/190808
More information about the Mlir-commits
mailing list