[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
Wed May 29 14:55:40 PDT 2019


aprantl added a comment.

> The patch is needed to describe a call site to an external function. Currently, we do not have all necessary info for the debug call site (particular debug subprogram is missing for the external function). Since we can describe call site parameters for calls like that, we are producing additional subprogram for the declaration of the extern function by marking it with the DISPFlagDeclForCallSite flag.

I'm sorry if the answer to that question is already in your reply and I just failed to parse it: Why do we need the DISPFlagDeclForCallSite *flag* to differentiate the a DISubprogram. Isn't the fact that it is attached to a forward-declaration enough?

Secondly: since this is attached to a forward *declaration*, would it make sense to attach the unique (= not distinct) DISubprogram from the type hierarchy instead of creating another distinct node? What is the intended behavior when two LLVM modules containing the same forward declaration are llvm-linked during LTO?


CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D60713/new/

https://reviews.llvm.org/D60713





More information about the llvm-commits mailing list