[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 11:10:51 PDT 2017

probinson added a comment.

In https://reviews.llvm.org/D14358#881666, @aprantl wrote:

> Does this have to be exposed through the driver or could this be a cc1 option only?

My thinking was to make it easier for LLDB to play with it and decide whether DWARF conformance on this point is a good thing for them also.  But I admit it's not something an end user would really care about or want to change.  I can make it a cc1 option.

Comment at: include/clang/Basic/LangOptions.def:144
 BENIGN_LANGOPT(EmitAllDecls      , 1, 0, "emitting all declarations")
+BENIGN_LANGOPT(EmitFwdTemplateChildren, 1, 0, "emit template parameter children in forward declarations")
 LANGOPT(MathErrno         , 1, 1, "errno in math functions")
aprantl wrote:
> Why is this a LangOpt instead of a CodeGenOpt?
> Should it reference `debug` somewhere in the name?
Because I thought EmitAllDecls was for debug info, and this felt related.  But I see EmitAllDecls is not used in CGDebugInfo and generally we do put debug-related options in CodeGenOpt so I will move that.  (Someday we should collect all that stuff into a DebugOpt class.)
And I will rename it to DebugFwdTemplateChildren.


More information about the cfe-commits mailing list