[libc-commits] [libc] [libc] fix lfind old hdrgen (PR #115760)
via libc-commits
libc-commits at lists.llvm.org
Mon Nov 11 11:41:04 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-libc
Author: Nick Desaulniers (nickdesaulniers)
<details>
<summary>Changes</summary>
Fixes: #<!-- -->114692
---
Full diff: https://github.com/llvm/llvm-project/pull/115760.diff
2 Files Affected:
- (modified) libc/config/linux/api.td (+1-1)
- (modified) libc/spec/posix.td (+3-4)
``````````diff
diff --git a/libc/config/linux/api.td b/libc/config/linux/api.td
index 46523b4ca4b8df..a00e0f61b90df7 100644
--- a/libc/config/linux/api.td
+++ b/libc/config/linux/api.td
@@ -268,7 +268,7 @@ def SetJmpAPI : PublicAPI<"setjmp.h"> {
}
def SearchAPI : PublicAPI<"search.h"> {
- let Types = ["ACTION", "ENTRY", "struct hsearch_data"];
+ let Types = ["ACTION", "ENTRY", "struct hsearch_data", "__lsearchcompare_t"];
}
def SysStatvfsAPI : PublicAPI<"sys/statvfs.h"> {
diff --git a/libc/spec/posix.td b/libc/spec/posix.td
index d4712dc0c5d701..c9399ba6f4d15e 100644
--- a/libc/spec/posix.td
+++ b/libc/spec/posix.td
@@ -100,9 +100,6 @@ def StructStatvfs : NamedType<"struct statvfs">;
def StructStatvfsPtr : PtrType<StructStatvfs>;
def RestrictedStructStatvfsPtr : RestrictedPtrType<StructStatvfs>;
-// The function pointer type for the predicate for lsearch, lfind
-def LSearchCompareT : NamedType<"__lsearchcompare_t">;
-
def POSIX : StandardSpec<"POSIX"> {
PtrType CharPtr = PtrType<CharType>;
RestrictedPtrType RestrictedCharPtr = RestrictedPtrType<CharType>;
@@ -1577,12 +1574,14 @@ def POSIX : StandardSpec<"POSIX"> {
]
>;
+ NamedType LSearchCompareT = NamedType<"__lsearchcompare_t">;
HeaderSpec Search = HeaderSpec<
"search.h",
[], // Macros
[
ActionType,
- EntryType
+ EntryType,
+ LSearchCompareT,
], // Types
[], // Enumerations
[
``````````
</details>
https://github.com/llvm/llvm-project/pull/115760
More information about the libc-commits
mailing list