[PATCH] [coroutines] Rename driver flag -fcoroutines to -fcoroutines-ts

Richard Smith via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 29 17:58:02 PDT 2016


+def fcoroutines : Flag <["-"], "fcoroutines-ts">, Group<f_Group>,
+  Flags<[DriverOption, CC1Option]>,
+  HelpText<"Enable support for the C++ Coroutines TS">;
+def fno_coroutines : Flag <["-"], "fno-coroutines-ts">, Group<f_Group>,

These should be named fcoroutines_ts, fno_coroutines_ts (see comment at the
top of the file for the naming scheme).

+      .Case("coroutines", LangOpts.Coroutines)

We should use the SD-6 macro name (__cpp_coroutines) rather than
__has_feature for new features that are covered by SD-6. However, we
shouldn't be defining this until we have a complete implementation. (Code
using this for a feature test wants to test whether the feature works, not
just whether it's enabled on the command line.)

On Thu, Sep 29, 2016 at 5:45 PM, Gor Nishanov <gornishanov at gmail.com> wrote:

> Let's see if renaming the attachment to *.txt helps.
>
> On Thu, Sep 29, 2016 at 5:42 PM, Gor Nishanov <gornishanov at gmail.com>
> wrote:
>
>> Currently the -fcoroutines flag is a CC1 only flag. It really should be
>> both a Driver and CC1 flag. This patch fixes the option and adds tests for
>> the new options.
>>
>> Also adds a __has_feature for coroutines.
>> Patch is mostly by Eric Fiselier
>> .
>> Meticulous and painstaking extraction from the larger coroutine branch by
>> Gor Nishanov
>>
>> P.S.
>>
>> Switching to lowercase [coroutines] tag in the title, as most of the
>> coroutine commits in cfe were done with lowercase tag.
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160929/e9ec8557/attachment.html>


More information about the cfe-commits mailing list