[PATCH] D33614: Cloning: Fix debug info cloning

David Blaikie via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri May 26 18:01:34 PDT 2017


dblaikie added a comment.

The assertion is that, in the presence of a separate declaration (eg: a member function that is a coroutine - so the member variable gets a declaration (this is about the only time LLVM has/uses a separate declaration for a function/subprogram in the debug info) and models an out of line definition (even if the definition is in-line)) that if there is a linkage name for the declaration, then it's the same as the linkage name for the definition.

This seems pretty wrong for coroutines where the debug info looks like it's going to have 3-4 functions, with different mangled names, all that claim to be an implementation of the same declaration? Their mangled names won't match the declaration anyway...

I think maybe, it'd be better to drop the linkage name when cloning. (or use the linkage name of the clone - and change/relax the assertion) It won't be better in the end - the debug info would still have multiple definitions referring to the same declaration and if the declaration has a linkage name it'll be right for at most one of those functions and wrong for the rest. But at least the IR won't be /as/ wrong... ish.


https://reviews.llvm.org/D33614





More information about the llvm-commits mailing list