[PATCH] D152017: [DebugInfo] Add flag to only emit referenced member functions
David Blaikie via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jun 5 13:42:48 PDT 2023
dblaikie added a comment.
In D152017#4396906 <https://reviews.llvm.org/D152017#4396906>, @probinson wrote:
> I experimented with this. Looks like it emits info only for //defined// methods, and not //used// methods. That is, if you change the test to say
> `void t1::f1() { f2(); }`
> you get DWARF for f1 but not f2. The way Sony does it, you get DWARF for f1 and f2.
> (Neither case sees info for f3, which is declared but not defined or used.)
Ah, that's good to understand - didn't realize that's what you folks were doing. Fair enough then.
> Is that what you intended?
It is.
What's the particular goal/value in including called-but-not-defined functions? Are your users generally building only parts of their program with debug info & you want it to be complete-ish in the parts that do have debug info? Because if they were building the whole program with debug info, /some/ translation unit would have the definition of the function, and the debug info for it.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D152017/new/
https://reviews.llvm.org/D152017
More information about the cfe-commits
mailing list