These have been superceded by the front-end's own internal tracking of
instantiations, exposed by `-ftransition=templates'.
gcc/d/ChangeLog:
* d-lang.cc: Include dmd/template.h.
(d_parse_file): Call printTemplateStats when vtemplates is set.
* decl.cc (start_function): Remove OPT_Wtemplates warning.
* lang.opt (Wtemplates): Remove.
#include "dmd/module.h"
#include "dmd/mtype.h"
#include "dmd/target.h"
+#include "dmd/template.h"
#include "opts.h"
#include "alias.h"
}
}
+ if (global.params.vtemplates)
+ printTemplateStats ();
+
/* Generate JSON files. */
if (global.params.doJsonGeneration)
{
modules not in this compilation, or thunk aliases. */
TemplateInstance *ti = fd->isInstantiated ();
if (ti && ti->needsCodegen ())
- {
- /* Warn about templates instantiated in this compilation. */
- if (ti == fd->parent)
- {
- warning (OPT_Wtemplates, "%s %qs instantiated",
- ti->kind (), ti->toPrettyChars (false));
- }
-
- DECL_EXTERNAL (fndecl) = 0;
- }
+ DECL_EXTERNAL (fndecl) = 0;
else
{
Module *md = fd->getModule ();
D
Warn from speculative compiles such as __traits(compiles).
-Wtemplates
-D
-; Documented in C
-
Wunknown-pragmas
D Var(warn_unknown_pragmas) LangEnabledBy(D, Wextra)
; Documented in C