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

David Blaikie via cfe-commits cfe-commits at lists.llvm.org
Wed Sep 27 14:04:01 PDT 2017


On Wed, Sep 27, 2017 at 1:58 PM Paul Robinson via Phabricator <
reviews at reviews.llvm.org> wrote:

> 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.
>

Fair enough.


> ================
> 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?
>

Not sure

Reid?


>
>
> ================
> 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.
>

*nod* I understand that it's part of the original issue, but doesn't seem
needed/relevant here.  Thanks! :)


>
>
>
> https://reviews.llvm.org/D14358
>
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20170927/400a19d5/attachment.html>


More information about the cfe-commits mailing list