[PATCH] D22275: Support -fno-delayed-template-parsing in clang-cl.exe
Dave Bartolomeo via cfe-commits
cfe-commits at lists.llvm.org
Tue Jul 12 12:32:23 PDT 2016
DaveBartolomeo created this revision.
DaveBartolomeo added reviewers: rnk, majnemer, cfe-commits.
This change adds support for the -fno-delayed-template-parsing option in clang-cl.exe. This allows developers using clang-cl.exe to opt out of emulation of MSVC's non-conformant template instantiation implementation while continuing to use clang-cl.exe for its emulation of cl.exe command-line options. The default behavior of clang-cl.exe (-fdelayed-template-parsing) is unchanged.
The MSVC Standard Library implementation uses clang-cl.exe with this switch in its tests to ensure that the library headers work on compilers with the conformant two-phase-lookup behavior.
http://reviews.llvm.org/D22275
Files:
include/clang/Driver/Options.td
Index: include/clang/Driver/Options.td
===================================================================
--- include/clang/Driver/Options.td
+++ include/clang/Driver/Options.td
@@ -813,7 +813,7 @@
"(default))">;
def fdelayed_template_parsing : Flag<["-"], "fdelayed-template-parsing">, Group<f_Group>,
HelpText<"Parse templated function definitions at the end of the "
- "translation unit">, Flags<[CC1Option]>;
+ "translation unit">, Flags<[CC1Option, CoreOption]>;
def fms_memptr_rep_EQ : Joined<["-"], "fms-memptr-rep=">, Group<f_Group>, Flags<[CC1Option]>;
def fmodules_cache_path : Joined<["-"], "fmodules-cache-path=">, Group<i_Group>,
Flags<[DriverOption, CC1Option]>, MetaVarName<"<directory>">,
@@ -950,7 +950,7 @@
Flags<[CoreOption]>;
def fno_ms_compatibility : Flag<["-"], "fno-ms-compatibility">, Group<f_Group>,
Flags<[CoreOption]>;
-def fno_delayed_template_parsing : Flag<["-"], "fno-delayed-template-parsing">, Group<f_Group>;
+def fno_delayed_template_parsing : Flag<["-"], "fno-delayed-template-parsing">, Group<f_Group>, Flags<[CC1Option, CoreOption]>;
def fno_objc_exceptions: Flag<["-"], "fno-objc-exceptions">, Group<f_Group>;
def fno_objc_legacy_dispatch : Flag<["-"], "fno-objc-legacy-dispatch">, Group<f_Group>;
def fno_objc_weak : Flag<["-"], "fno-objc-weak">, Group<f_Group>, Flags<[CC1Option]>;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22275.63713.patch
Type: text/x-patch
Size: 1398 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160712/bea527b7/attachment.bin>
More information about the cfe-commits
mailing list