[libc-commits] [libc] [libc][wctype] Rename src/wctype/wctype.h to avoid name collision with system header. (PR #200613)

via libc-commits libc-commits at lists.llvm.org
Sat May 30 14:36:12 PDT 2026


llvmorg-github-actions[bot] wrote:


<!--LLVM PR SUMMARY COMMENT-->

@llvm/pr-subscribers-libc

Author: lntue

<details>
<summary>Changes</summary>



---
Full diff: https://github.com/llvm/llvm-project/pull/200613.diff


5 Files Affected:

- (modified) libc/src/wctype/CMakeLists.txt (+1-1) 
- (modified) libc/src/wctype/wctype.cpp (+1-1) 
- (renamed) libc/src/wctype/wctype_impl.h () 
- (modified) libc/test/src/wctype/iswctype_test.cpp (+1-1) 
- (modified) libc/test/src/wctype/wctype_test.cpp (+1-1) 


``````````diff
diff --git a/libc/src/wctype/CMakeLists.txt b/libc/src/wctype/CMakeLists.txt
index 83fc0312296da..f68666e2b0176 100644
--- a/libc/src/wctype/CMakeLists.txt
+++ b/libc/src/wctype/CMakeLists.txt
@@ -148,7 +148,7 @@ add_entrypoint_object(
   SRCS
     wctype.cpp
   HDRS
-    wctype.h
+    wctype_impl.h
   DEPENDS
     libc.src.__support.wctype_impl
     libc.hdr.types.wctype_t
diff --git a/libc/src/wctype/wctype.cpp b/libc/src/wctype/wctype.cpp
index 8cd8210753831..b5ea45b14a57b 100644
--- a/libc/src/wctype/wctype.cpp
+++ b/libc/src/wctype/wctype.cpp
@@ -6,10 +6,10 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "src/wctype/wctype.h"
 #include "hdr/types/wctype_t.h"
 #include "src/__support/common.h"
 #include "src/__support/wctype_impl.h"
+#include "src/wctype/wctype_impl.h"
 
 namespace LIBC_NAMESPACE_DECL {
 
diff --git a/libc/src/wctype/wctype.h b/libc/src/wctype/wctype_impl.h
similarity index 100%
rename from libc/src/wctype/wctype.h
rename to libc/src/wctype/wctype_impl.h
diff --git a/libc/test/src/wctype/iswctype_test.cpp b/libc/test/src/wctype/iswctype_test.cpp
index 4aed4d047b619..09b333517e469 100644
--- a/libc/test/src/wctype/iswctype_test.cpp
+++ b/libc/test/src/wctype/iswctype_test.cpp
@@ -7,7 +7,7 @@
 //===----------------------------------------------------------------------===//
 
 #include "src/wctype/iswctype.h"
-#include "src/wctype/wctype.h"
+#include "src/wctype/wctype_impl.h"
 
 #include "test/UnitTest/Test.h"
 
diff --git a/libc/test/src/wctype/wctype_test.cpp b/libc/test/src/wctype/wctype_test.cpp
index e4aa1bb6694d6..d69291d400a79 100644
--- a/libc/test/src/wctype/wctype_test.cpp
+++ b/libc/test/src/wctype/wctype_test.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-#include "src/wctype/wctype.h"
+#include "src/wctype/wctype_impl.h"
 
 #include "test/UnitTest/Test.h"
 

``````````

</details>


https://github.com/llvm/llvm-project/pull/200613


More information about the libc-commits mailing list