Add Parameters to DW_AT_name Attribute of Template Variables
Needs ReviewPublic

Authored by ormris on Thu, Sep 13, 1:27 PM.

Details

Summary

This patch adds the associated template parameters to the DWARF name attribute
of all template variable specializations, mirroring how they are referenced in
the source code.

Depends on LLVM revision: D52057

Original review: D44842

This version updates the LLVM-C interface.

Diff Detail

ormris created this revision.Thu, Sep 13, 1:27 PM
JDevlieghere added inline comments.Fri, Sep 14, 6:36 AM
lib/CodeGen/CGDebugInfo.cpp
3126

What's the meaning of this comment?

lib/CodeGen/CGDebugInfo.h
654

s/templateParameters/TemplateParameters/ (same for the rest of this patch)

ormris added inline comments.Fri, Sep 14, 9:18 AM
lib/CodeGen/CGDebugInfo.cpp
3126

Hmm... That should be removed.

lib/CodeGen/CGDebugInfo.h
654

OK. Will fix.

ormris updated this revision to Diff 165789.EditedMon, Sep 17, 10:59 AM
  • Removed unneeded comment
  • Renamed variable
  • Rebased
ormris marked 2 inline comments as done.Mon, Sep 17, 11:00 AM

Generally this looks good, but I'd like for the other to have a look first (at this and the other patch) before accepting.

lib/CodeGen/CGDebugInfo.cpp
1783

Might be nice to add a comment here saying what you're doing in this block and below. Looks like the top one is for partial specialization and the bottom one for the general case?

1783

I also suggest to extract TS->getSpecializedTemplateOrPartial() into a variable to make this a little less dense.

Generally this looks good, but I'd like for the other to have a look first (at this and the other patch) before accepting.

Sounds good. Thanks for your comments!

lib/CodeGen/CGDebugInfo.cpp
1783

Hmm... Yeah. I'll take a look at clarifying this section.