[clang] Adjust modulemap to mark mm3dnow as textual header. (PR #107155)

James Y Knight via cfe-commits cfe-commits at lists.llvm.org
Tue Sep 3 14:37:26 PDT 2024


https://github.com/jyknight created https://github.com/llvm/llvm-project/pull/107155

This avoids issuing the deprecation diagnostic when building the module.

Not building it into a module shouldn't cause any negative impacts, since it no longer has any declarations other than the header guard. It's also very rarely included by anything.

Addresses https://github.com/llvm/llvm-project/pull/96246#issuecomment-2322453809

>From 861906e432651966238ea764f5a3ac61f0d55c0a Mon Sep 17 00:00:00 2001
From: James Y Knight <jyknight at google.com>
Date: Tue, 3 Sep 2024 17:03:49 -0400
Subject: [PATCH] Adjust modulemap to mark mm3dnow as textual header.

This avoids issuing the deprecation diagnostic when building the module.

Not building it into a module shouldn't cause any negative impacts,
since it no longer has any declarations other than the header
guard. It's also very rarely included by anything.

Addresses https://github.com/llvm/llvm-project/pull/96246#issuecomment-2322453809
---
 clang/lib/Headers/module.modulemap | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/clang/lib/Headers/module.modulemap b/clang/lib/Headers/module.modulemap
index 9ffc249c8d1a23..dcaf09e8f2c558 100644
--- a/clang/lib/Headers/module.modulemap
+++ b/clang/lib/Headers/module.modulemap
@@ -66,6 +66,8 @@ module _Builtin_intrinsics [system] [extern_c] {
     textual header "__wmmintrin_aes.h"
     textual header "__wmmintrin_pclmul.h"
 
+    textual header "mm3dnow.h"
+
     explicit module mm_malloc {
       requires !freestanding
       header "mm_malloc.h"
@@ -122,10 +124,6 @@ module _Builtin_intrinsics [system] [extern_c] {
       header "popcntintrin.h"
     }
 
-    explicit module mm3dnow {
-      header "mm3dnow.h"
-    }
-
     explicit module aes_pclmul {
       header "wmmintrin.h"
       export aes



More information about the cfe-commits mailing list