[cfe-commits] r148393 - in /cfe/trunk: include/clang/Driver/Options.td lib/Driver/Tools.cpp test/Driver/modules.mm

Douglas Gregor dgregor at apple.com
Wed Jan 18 08:58:58 PST 2012


On Jan 18, 2012, at 8:41 AM, Erik Verbruggen wrote:

> 
> 
> On 18 jan. 2012, at 16:19, Douglas Gregor <dgregor at apple.com> wrote:
> 
>> Author: dgregor
>> Date: Wed Jan 18 09:19:58 2012
>> New Revision: 148393
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=148393&view=rev
>> Log:
>> In the driver, -fmodules enables modules for C/Objective-C but one
>> also needs -fcxx-modules to enable modules for C++/Objective-C++.
> 
> Why the distinction?


Because I expect modules for C/Objective-C to be usable long before C++/Objective-C++. Making this distinction allows someone with a mixed C/C++ project to turn on modules project-wide with -fmodules without breaking horribly on the C++ code.

We did the same thing "back in the day" when Clang had decent C/ObjC support, but C++ was still coming online (in that case, C++ fell back to g++ or llvm-g++).

	- Doug



More information about the cfe-commits mailing list