[libc-commits] [libc] [libc] add doc for search.h (PR #80492)

Nick Desaulniers via libc-commits libc-commits at lists.llvm.org
Fri Feb 2 15:50:26 PST 2024


================
@@ -0,0 +1,85 @@
+=============
+Search Tables
+=============
+
+.. include:: check.rst
+
+---------------
+Source location
+---------------
+
+-   The main source for bitwise utility functions is located at:
+    ``libc/src/search``.
+
+-   Hashtable implementation is located at:
+    ``libc/src/__support/HashTable``.
+
+-   The tests are located at:
+    ``libc/test/src/search/``.
+
+---------------------
+Implementation Status
+---------------------
+
+POSIX Standard Types
+====================
+
+============================ =========
+Type Name                    Available
+============================ =========
+ACTION                       |check|
+ENTRY                        |check|
+VISIT                        
+============================ =========
+
+
+GNU Extension Types
+===================
+
+============================ ================= =========
+Type Name                    Associated Macro  Available
+============================ ================= ========= 
+struct qelem                 
+__compar_fn_t                __COMPAR_FN_T
+comparison_fn_t
+__action_fn_t                __ACTION_FN_T
+__free_fn_t
----------------
nickdesaulniers wrote:

> However, I think that ppl writing portable code should not actually use them.

100%.  Let's not encourage them to look up what these even are then, lest they come to depend on them.

> How about mentioning that "the following types provided by GNU libc's header will not be declared by LLVM libc"

I don't think it will scale to mention every type internal to every other libc (or even just glibc).

---

> As such I think we should either:
> Mark that we will not implement these.
> Simply do not mention them at all.

Now that I have a better sense of where these originate from, I'm going to change my preferences to just a lone preference for "do not mention them at all."

It was worth discussing, so I am happy to think more about this.

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


More information about the libc-commits mailing list