From 7edf9a4e4c5a36b2e43949f454b2e6c4aa2efd1c Mon Sep 17 00:00:00 2001 From: Chandler Carruth Date: Thu, 24 Oct 2013 09:21:37 +0000 Subject: [PATCH] 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. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@193319 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/clang/Driver/Options.td | 1 + test/Driver/clang_f_opts.c | 1 + 2 files changed, 2 insertions(+) diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index b88aeebdcb..2244a98ed9 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -1442,6 +1442,7 @@ defm function_attribute_list : BooleanFFlag<"function-attribute-list">, Group, Group; defm gnu : BooleanFFlag<"gnu">, Group; defm ident : BooleanFFlag<"ident">, Group; +defm implicit_templates : BooleanFFlag<"implicit-templates">, Group; defm inline_limit : BooleanFFlag<"inline-limit">, Group; defm ivopts : BooleanFFlag<"ivopts">, Group; defm non_call_exceptions : BooleanFFlag<"non-call-exceptions">, Group; diff --git a/test/Driver/clang_f_opts.c b/test/Driver/clang_f_opts.c index e315245614..d8e9b467c5 100644 --- a/test/Driver/clang_f_opts.c +++ b/test/Driver/clang_f_opts.c @@ -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 \ -- 2.40.0