[PATCH] D60713: [IR] Add DISuprogram and DIE for func decl of an external
Adrian Prantl via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Thu May 30 08:56:59 PDT 2019
aprantl added a comment.
Prior to this patch Function declarations may not have a !dbg attachment, because there was no use-case for it. With call site debug info, I think it would make sense to revisit this rule. When I made my previous comment, I thought that the updated rule could be:
(1) function definitions may have a distinct DISubprogram attached (as before)
(2) function declarations may have a unique DISubprogram attached (new)
If I read the code in Verifier.cpp correctly, then it is legal for a unique DISubprogram to not have a unit, which would cause the declaration-DISubprograms to be uniqued during LTO.
so the (2) should probably be:
(2) function declarations may have a unique DISubprogram attached and it may not have a unit: field
I've CC'ed Duncan in case he can catch a logic error with this reasoning.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D60713/new/
https://reviews.llvm.org/D60713
More information about the llvm-commits
mailing list