[PATCH] D24752: [Modules] Add missing dependencies to clang builtins modulemap

Elad Cohen via cfe-commits cfe-commits at lists.llvm.org
Mon Sep 19 22:37:55 PDT 2016


eladcohen created this revision.
eladcohen added a reviewer: rsmith.
eladcohen added a subscriber: cfe-commits.

X86 intrinsic header files mm3dnow.h and wmmintrin.h include and depend on mmintrin.h and emmintrin.h respectively.
This patch adds these missing dependencies to the corresponding submodules in the clang builtins modulemap.

https://reviews.llvm.org/D24752

Files:
  lib/Headers/module.modulemap
  test/Modules/compiler_builtins_x86_submodules.c

Index: test/Modules/compiler_builtins_x86_submodules.c
===================================================================
--- test/Modules/compiler_builtins_x86_submodules.c
+++ test/Modules/compiler_builtins_x86_submodules.c
@@ -0,0 +1,15 @@
+// RUN: rm -rf %t
+// RUN: %clang_cc1 -triple i686-unknown-unknown -target-feature +3dnowa -fsyntax-only -fmodules -fimplicit-module-maps -fmodules-cache-path=%t %s -verify -ffreestanding
+
+// expected-no-diagnostics
+
+#include<mm3dnow.h>
+
+__m64 x; // Verify that types which are used by mm3dnow.h
+         // but declared in the mmx submodule get imported
+
+#include<wmmintrin.h>
+
+__m128i y; // Verify that types which are used by wmmintrin.h
+           // but declared in the sse2 submodule get imported
+
Index: lib/Headers/module.modulemap
===================================================================
--- lib/Headers/module.modulemap
+++ lib/Headers/module.modulemap
@@ -119,6 +119,7 @@
     }
 
     explicit module mm3dnow {
+      export mmx
       header "mm3dnow.h"
     }
 
@@ -129,6 +130,7 @@
     }
 
     explicit module aes {
+      export sse2
       header "__wmmintrin_aes.h"
     }
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D24752.71899.patch
Type: text/x-patch
Size: 1163 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160920/29f1a53e/attachment.bin>


More information about the cfe-commits mailing list