[Patch][BugzillaID#18985] Document __has_feature(modules)

Vassil Vassilev vasil.georgiev.vasilev at cern.ch
Thu Sep 18 03:47:06 PDT 2014


On 09/17/2014 09:51 PM, Ben Langmuir wrote:
>> Index: docs/LanguageExtensions.rst
>> ===================================================================
>> --- docs/LanguageExtensions.rst	(revision 217389)
>> +++ docs/LanguageExtensions.rst	(working copy)
>> @@ -477,6 +477,13 @@
>>   Use ``__has_feature(cxx_rtti)`` to determine if C++ RTTI has been enabled.  For
>>   example, compiling code with ``-fno-rtti`` disables the use of RTTI.
>>   
>> +C++ Modules
>> +^^^^^^^^
>> +
>> +Use ``__has_feature(modules)`` to determine if experimental C++ Modules have
>> +been enabled. For example, compiling code with ``-fmodules`` enables the use of
>> +C++ Modules.
>> +
>>   C++11
>>   -----
>>
> Why are we making this specific to C++ modules?  Modules are supported in C/ObjC. And to actually get modules in C++ you also need -fcxx-modules.
Thanks for the comments. lib/Driver/Tools.cpp:3790 says:
   // -fmodules enables modules (off by default). However, for 
C++/Objective-C++,
   // users must also pass -fcxx-modules. The latter flag will disappear 
once the
   // modules implementation is solid for C++/Objective-C++ programs as 
well.

I prefer not to document the -fcxx-modules. The attached patch doesn't 
mention the C++ modules but Modules in general (I decided to put them 
into a separate section). Is it any better?
Vassil
>
> Ben
>
>> On Sep 17, 2014, at 12:59 AM, Vassil Vassilev <vasil.georgiev.vasilev at cern.ch> wrote:
>>
>> Hi,
>>   I am attaching a patch addressing http://llvm.org/bugs/show_bug.cgi?id=18985
>>   I wasn't sure whether I had to say 'experimental C++ modules'.
>> Vassil
>> <Bug18985.diff>_______________________________________________
>> cfe-commits mailing list
>> cfe-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

-------------- next part --------------
A non-text attachment was scrubbed...
Name: Bug18985_1.diff
Type: text/x-patch
Size: 647 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140918/6dbaad5e/attachment.bin>


More information about the cfe-commits mailing list