[PATCH] D14358: DWARF's forward decl of a template should have template parameters.

Paul Robinson via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 27 13:58:55 PDT 2017

probinson added a reviewer: rnk.
probinson added a comment.

+rnk for the CodeView question.

Comment at: include/clang/Frontend/CodeGenOptions.def:222
 				     ///< of inline stack frames without .dwo files.
+CODEGENOPT(DebugFwdTemplateParams, 1, 0) ///< Whether to emit complete
+                                         ///< template parameter descriptions in
dblaikie wrote:
> Maybe 'Decl' rather than 'Fwd'.
Well, in a sense they are all declarations, and 'Fwd' is a clearer statement of the distinction this flag is trying to make.  Unless you feel strongly I'd prefer to leave it as is.

Comment at: lib/CodeGen/CGDebugInfo.cpp:836
       llvm::DINode::FlagFwdDecl, FullName);
+  if (CGM.getCodeGenOpts().DebugFwdTemplateParams)
+    if (auto *TSpecial = dyn_cast<ClassTemplateSpecializationDecl>(RD))
It just occurred to me... should CodeView care about this?

Comment at: test/CodeGenCXX/debug-info-fwd-template-param.cpp:7
+template<typename T> class A;
+A<const int> *p;
dblaikie wrote:
> Any particular reason for const int, rather than int?
It was the illustrative example of the difference between the demangler ("int const") and clang ("const int") that the debugger guys tripped over, and so was in the source I started with when creating this test.  I think you are correct, it is not important to have it.


More information about the cfe-commits mailing list