[PATCH] D46139: Add template type and value parameter metadata nodes to template variable specializations.

Paul Robinson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 26 12:06:06 PDT 2018


probinson added inline comments.


================
Comment at: lib/CodeGen/CGDebugInfo.cpp:3023
+  templateParameters = parameterNodes.get();
+
   // Since we emit declarations (DW_AT_members) for static members, place the
----------------
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.)


Repository:
  rC Clang

https://reviews.llvm.org/D46139





More information about the cfe-commits mailing list