This is an archive of the discontinued LLVM Phabricator instance.

[CodeView][DebugInfo] Update the code for removing template arguments from the display name of a codeview function id.
ClosedPublic

Authored by akhuang on Feb 2 2021, 12:52 PM.

Details

Summary

Previously the code split the string at the first '<', which
incorrectly truncated names like operator<.

Diff Detail

Event Timeline

akhuang created this revision.Feb 2 2021, 12:52 PM
akhuang requested review of this revision.Feb 2 2021, 12:52 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 2 2021, 12:52 PM
rnk accepted this revision.Feb 4 2021, 2:26 PM

lgtm

llvm/lib/CodeGen/AsmPrinter/CodeViewDebug.cpp
388–389

I had to go remind myself why we don't do this in the frontend. The reason is that we put the template arguments in the S_GPROC32 symbol records, but we don't put them in the LF_FUNC_ID records. Can you update this comment to explain why we have to throw away the template arguments here? If we really wanted this to be super clean, we could change DISubprogram to split the name into the basename and the template argument list string, but that seems unnecessary.

This revision is now accepted and ready to land.Feb 4 2021, 2:26 PM
akhuang updated this revision to Diff 321623.Feb 4 2021, 5:35 PM
akhuang marked an inline comment as done.

Add to comment

This revision was landed with ongoing or failed builds.Feb 5 2021, 9:49 AM
This revision was automatically updated to reflect the committed changes.