]> granicus.if.org Git - clang/commitdiff
Teach Clang to accept and ignore -f[no-]implicit-templates.
authorChandler Carruth <chandlerc@gmail.com>
Thu, 24 Oct 2013 09:21:37 +0000 (09:21 +0000)
committerChandler Carruth <chandlerc@gmail.com>
Thu, 24 Oct 2013 09:21:37 +0000 (09:21 +0000)
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.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193319 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Driver/Options.td
test/Driver/clang_f_opts.c

index b88aeebdcb673326b2de0d63d164dd921d8c1ed3..2244a98ed9072c1d0acd93febaefbe12b510d147 100644 (file)
@@ -1442,6 +1442,7 @@ defm function_attribute_list : BooleanFFlag<"function-attribute-list">, Group<cl
 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>;
index e315245614551fcdf0e1c1e370520de7010512e1..d8e9b467c5fcd6ef8ab3aee9974e3d4b3c20c0cf 100644 (file)
 // 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                                      \