This is an archive of the discontinued LLVM Phabricator instance.

[codeview] Use comdats for debug info describing comdat functions
ClosedPublic

Authored by rnk on May 25 2016, 1:36 PM.

Details

Summary

This allows the linker to discard unused symbol information for comdat
functions that were discarded during the link. Before this change,
searching for the name of an inline function in the debugger would
return multiple results, one per symbol subsection in the object file.
After this change, there is only one result, the result for the function
chosen by the linker.

Diff Detail

Repository
rL LLVM

Event Timeline

rnk updated this revision to Diff 58494.May 25 2016, 1:36 PM
rnk retitled this revision from to [codeview] Use comdats for debug info describing comdat functions.
rnk updated this object.
rnk added reviewers: zturner, majnemer.
rnk added subscribers: llvm-commits, amccarth, aaboud.
majnemer accepted this revision.May 25 2016, 2:16 PM
majnemer edited edge metadata.

LGTM

lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
21–22 ↗(On Diff #58494)

Please sort these.

lib/CodeGen/AsmPrinter/CodeViewDebug.h
107 ↗(On Diff #58494)

Hmm, will this really be small for most TUs?

This revision is now accepted and ready to land.May 25 2016, 2:16 PM
rnk marked an inline comment as done.May 25 2016, 3:58 PM
rnk added inline comments.
lib/CodeGen/AsmPrinter/CodeViewDebug.h
107 ↗(On Diff #58494)

Well, yeah, I expect most TUs have lots of inline functions and I expect this set to get large and go the malloc case. I figure we might as well get out of the linear search small mode and into the hashed malloc mode fairly early. Maybe I should just use DenseSet.

This revision was automatically updated to reflect the committed changes.