r193319 - Teach Clang to accept and ignore -f[no-]implicit-templates.
Chandler Carruth
chandlerc at gmail.com
Thu Oct 24 02:21:37 PDT 2013
Author: chandlerc
Date: Thu Oct 24 04:21:37 2013
New Revision: 193319
URL: http://llvm.org/viewvc/llvm-project?rev=193319&view=rev
Log:
Teach Clang to accept and ignore -f[no-]implicit-templates.
This GCC flag is useful when you want to control whether implicit
template instantiation occurs at the commandline level. Clang doesn't
currently support such controls, but technically *always* implicitly
instantiating (what Clang does, and what every other compiler still in
use does by default) is valid behavior even under
-fno-implicit-templates, it just may be slow and very wasteful. If
people really want this, we can try to implement it, but I don't have an
actual use.
This should help fix the build of libstdc++ with Clang, its build system
uses this flag.
Modified:
cfe/trunk/include/clang/Driver/Options.td
cfe/trunk/test/Driver/clang_f_opts.c
Modified: cfe/trunk/include/clang/Driver/Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=193319&r1=193318&r2=193319&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Thu Oct 24 04:21:37 2013
@@ -1442,6 +1442,7 @@ defm function_attribute_list : BooleanFF
defm gcse : BooleanFFlag<"gcse">, Group<clang_ignored_f_Group>;
defm gnu : BooleanFFlag<"gnu">, Group<clang_ignored_f_Group>;
defm ident : BooleanFFlag<"ident">, Group<clang_ignored_f_Group>;
+defm implicit_templates : BooleanFFlag<"implicit-templates">, Group<clang_ignored_f_Group>;
defm inline_limit : BooleanFFlag<"inline-limit">, Group<clang_ignored_f_Group>;
defm ivopts : BooleanFFlag<"ivopts">, Group<clang_ignored_f_Group>;
defm non_call_exceptions : BooleanFFlag<"non-call-exceptions">, Group<clang_ignored_f_Group>;
Modified: cfe/trunk/test/Driver/clang_f_opts.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/Driver/clang_f_opts.c?rev=193319&r1=193318&r2=193319&view=diff
==============================================================================
--- cfe/trunk/test/Driver/clang_f_opts.c (original)
+++ cfe/trunk/test/Driver/clang_f_opts.c Thu Oct 24 04:21:37 2013
@@ -110,6 +110,7 @@
// RUN: -feliminate-unused-debug-types -fno-eliminate-unused-debug-types \
// RUN: -fgcse -fno-gcse \
// RUN: -fident -fno-ident \
+// RUN: -fimplicit-templates -fno-implicit-templates \
// RUN: -fivopts -fno-ivopts \
// RUN: -fnon-call-exceptions -fno-non-call-exceptions \
// RUN: -fpermissive -fno-permissive \
More information about the cfe-commits
mailing list