[libcxx] r218372 - Mark module atomic as cplusplus11.

Nico Weber nicolasweber at gmx.de
Tue Sep 23 21:44:54 PDT 2014


Author: nico
Date: Tue Sep 23 23:44:54 2014
New Revision: 218372

URL: http://llvm.org/viewvc/llvm-project?rev=218372&view=rev
Log:
Mark module atomic as cplusplus11.

With clang, the header atomic requires __has_feature(cxx_atomic), which is only
true in c++11 mode. Because of this, when using modules in c++98 with libc++
compilation of the std module would fail without this change, PR21002.

(With gcc, only gcc4.7+ is needed, no c++11. But gcc doesn't have modules yet,
and the module.modulemap language can't express things like "this is only
required if the compiler is clang". If gcc gets module support, we'd probably
have a module.modulemap file for each compiler that libc++ supports?)

Modified:
    libcxx/trunk/include/module.modulemap

Modified: libcxx/trunk/include/module.modulemap
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/include/module.modulemap?rev=218372&r1=218371&r2=218372&view=diff
==============================================================================
--- libcxx/trunk/include/module.modulemap (original)
+++ libcxx/trunk/include/module.modulemap Tue Sep 23 23:44:54 2014
@@ -16,6 +16,7 @@ module std [system] {
   module atomic {
     header "atomic"
     export *
+    requires cplusplus11
   }
   module bitset {
     header "bitset"





More information about the cfe-commits mailing list