[PATCH] D152095: [Verifier] definition subprograms cannot be nested within DICompositeType when enabling ODR.
David Blaikie via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 26 15:24:23 PDT 2023
dblaikie added a subscriber: JDevlieghere.
dblaikie added a comment.
This has LLVM changes in it? What's the purpose of those changes?
================
Comment at: llvm/test/DebugInfo/Generic/cross-cu-inlining-ranges.ll:50
!9 = !DILocation(line: 0, scope: !10, inlinedAt: !13)
-!10 = distinct !DISubprogram(name: "init", scope: !12, file: !11, type: !7, spFlags: DISPFlagDefinition, unit: !0)
+!10 = distinct !DISubprogram(name: "init", scope: !12, file: !11, type: !7, spFlags: DISPFlagDefinition, unit: !0, declaration: !22)
!11 = !DIFile(filename: "<compiler-generated>", directory: "")
----------------
This looks a bit confused - it's claiming to be a definition, but it's not referenced by any llvm Function - and then it's referencing a declaration? Perhaps these functions should not have the definition flag?
@aprantl @JDevlieghere what's the Swift IR look like today? Does it put subprogram definitions within composite types? That's not ideal/bit likely to break under LTO builds & would you be amenable to changing that to indirect through a definition that's outside the composite type to a declaration in the composite type?
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152095/new/
https://reviews.llvm.org/D152095
More information about the llvm-commits
mailing list