This is an archive of the discontinued LLVM Phabricator instance.

Emit template type and value parameter DIEs for template variables.
AbandonedPublic

Authored by ormris on Apr 26 2018, 11:04 AM.

Diff Detail

Event Timeline

ormris created this revision.Apr 26 2018, 11:04 AM
ormris edited the summary of this revision. (Show Details)Apr 26 2018, 11:08 AM

I'm sorry if this was discussed earlier... Why are the template parameters attached to the variable, rather than the type?

I'm sorry if this was discussed earlier... Why are the template parameters attached to the variable, rather than the type?

Because these are template variables, not template types - a newer (C++14?) feature:

template<typename T> T t;
...
t<int> = 3;
t<std::string> = "foo";
etc...

Wow. Carry on :-)

lib/Bitcode/Writer/BitcodeWriter.cpp
1750

Since this is already versioned, why not make use of that and drop the expr field?

test/DebugInfo/X86/template.ll
105

Please remove all non-essential attributes. (everything in quotes)

ormris abandoned this revision.Apr 26 2018, 1:22 PM

After further inspection, this patch needs some more work. It doesn't cover the LLVM-C API. Since I'll need some time to implement that, I'm abandoning this revision.

Thanks @aprantl and @dblaikie for your comments!

ormris edited the summary of this revision. (Show Details)Oct 3 2018, 11:42 AM