This is an archive of the discontinued LLVM Phabricator instance.

Add template type and value parameter metadata nodes to template variable specializations.
AbandonedPublic

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

Diff Detail

Event Timeline

ormris created this revision.Apr 26 2018, 11:06 AM
probinson added inline comments.Apr 26 2018, 12:03 PM
lib/CodeGen/CGDebugInfo.cpp
3023

Naively it looks like it should be possible to put the local into a scope under the if:

if (isa<...>(VD)) {
  llvm::DINodeArray parameterNodes = CollectVarTemplateParams(VD, &*Unit);
  templateParameters = parameterNodes.get();
}

but you told me this caused crashes. I don't understand that, as templateParameters is itself a formal parameter, so you're really returning the node array to the caller?
(My understanding is at least partly hampered by being unable to find the definition of DINodeArray, if somebody can point it out that would be helpful.)

Thanks for spotting that @probinson. Will update.

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

After some further inspection, support for the LLVM side of patch needs a few significant additions. Abandoning this revision.