This revision was automatically updated to reflect the committed changes.
Closed by commit rL280613: [Modules] Add 'freestanding' to the 
'requires-declaration' feature-list. (authored by eladcohen).

Changed prior to commit:
  https://reviews.llvm.org/D23871?vs=69239&id=70279#toc

Repository:
  rL LLVM

https://reviews.llvm.org/D23871

Files:
  cfe/trunk/docs/Modules.rst
  cfe/trunk/lib/Basic/Module.cpp
  cfe/trunk/lib/Headers/module.modulemap
  cfe/trunk/test/Modules/compiler_builtins_x86.c

Index: cfe/trunk/docs/Modules.rst
===================================================================
--- cfe/trunk/docs/Modules.rst
+++ cfe/trunk/docs/Modules.rst
@@ -413,6 +413,9 @@
 cplusplus11
   C++11 support is available.
 
+freestanding
+  A freestanding environment is available.
+
 gnuinlineasm
   GNU inline ASM is available.
 
Index: cfe/trunk/test/Modules/compiler_builtins_x86.c
===================================================================
--- cfe/trunk/test/Modules/compiler_builtins_x86.c
+++ cfe/trunk/test/Modules/compiler_builtins_x86.c
@@ -0,0 +1,6 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fsyntax-only -fmodules -fimplicit-module-maps 
-fmodules-cache-path=%t %s -verify -ffreestanding
+// expected-no-diagnostics
+
+#include<x86intrin.h>
+
Index: cfe/trunk/lib/Basic/Module.cpp
===================================================================
--- cfe/trunk/lib/Basic/Module.cpp
+++ cfe/trunk/lib/Basic/Module.cpp
@@ -64,6 +64,7 @@
                         .Case("blocks", LangOpts.Blocks)
                         .Case("cplusplus", LangOpts.CPlusPlus)
                         .Case("cplusplus11", LangOpts.CPlusPlus11)
+                        .Case("freestanding", LangOpts.Freestanding)
                         .Case("gnuinlineasm", LangOpts.GNUAsm)
                         .Case("objc", LangOpts.ObjC1)
                         .Case("objc_arc", LangOpts.ObjCAutoRefCount)
Index: cfe/trunk/lib/Headers/module.modulemap
===================================================================
--- cfe/trunk/lib/Headers/module.modulemap
+++ cfe/trunk/lib/Headers/module.modulemap
@@ -63,6 +63,7 @@
     textual header "mwaitxintrin.h"
 
     explicit module mm_malloc {
+      requires !freestanding
       header "mm_malloc.h"
       export * // note: for <stdlib.h> dependency
     }


Index: cfe/trunk/docs/Modules.rst
===================================================================
--- cfe/trunk/docs/Modules.rst
+++ cfe/trunk/docs/Modules.rst
@@ -413,6 +413,9 @@
 cplusplus11
   C++11 support is available.
 
+freestanding
+  A freestanding environment is available.
+
 gnuinlineasm
   GNU inline ASM is available.
 
Index: cfe/trunk/test/Modules/compiler_builtins_x86.c
===================================================================
--- cfe/trunk/test/Modules/compiler_builtins_x86.c
+++ cfe/trunk/test/Modules/compiler_builtins_x86.c
@@ -0,0 +1,6 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -fsyntax-only -fmodules -fimplicit-module-maps -fmodules-cache-path=%t %s -verify -ffreestanding
+// expected-no-diagnostics
+
+#include<x86intrin.h>
+
Index: cfe/trunk/lib/Basic/Module.cpp
===================================================================
--- cfe/trunk/lib/Basic/Module.cpp
+++ cfe/trunk/lib/Basic/Module.cpp
@@ -64,6 +64,7 @@
                         .Case("blocks", LangOpts.Blocks)
                         .Case("cplusplus", LangOpts.CPlusPlus)
                         .Case("cplusplus11", LangOpts.CPlusPlus11)
+                        .Case("freestanding", LangOpts.Freestanding)
                         .Case("gnuinlineasm", LangOpts.GNUAsm)
                         .Case("objc", LangOpts.ObjC1)
                         .Case("objc_arc", LangOpts.ObjCAutoRefCount)
Index: cfe/trunk/lib/Headers/module.modulemap
===================================================================
--- cfe/trunk/lib/Headers/module.modulemap
+++ cfe/trunk/lib/Headers/module.modulemap
@@ -63,6 +63,7 @@
     textual header "mwaitxintrin.h"
 
     explicit module mm_malloc {
+      requires !freestanding
       header "mm_malloc.h"
       export * // note: for <stdlib.h> dependency
     }
_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to