[libc-commits] [libc] 4d812ac - [libc] Add a README to the sub-directories under the utils directory.
Siva Chandra Reddy via libc-commits
libc-commits at lists.llvm.org
Sun Feb 23 22:12:20 PST 2020
Author: Siva Chandra Reddy
Date: 2020-02-23T22:11:35-08:00
New Revision: 4d812acba61e6306181a830a18d21bcb07b9f8c7
URL: https://github.com/llvm/llvm-project/commit/4d812acba61e6306181a830a18d21bcb07b9f8c7
DIFF: https://github.com/llvm/llvm-project/commit/4d812acba61e6306181a830a18d21bcb07b9f8c7.diff
LOG: [libc] Add a README to the sub-directories under the utils directory.
Also, the source layout document has been updated to reflect the current
layout of the `utils` directory.
Reviewers: PaulkaToast
Differential Revision: https://reviews.llvm.org/D74502
Added:
libc/utils/HdrGen/README.md
libc/utils/UnitTest/README.md
Modified:
libc/docs/source_layout.rst
libc/utils/CPP/README.md
Removed:
################################################################################
diff --git a/libc/docs/source_layout.rst b/libc/docs/source_layout.rst
index 9bf63521bf07..a299a4d78a95 100644
--- a/libc/docs/source_layout.rst
+++ b/libc/docs/source_layout.rst
@@ -13,9 +13,7 @@ directories::
- loader
- src
- test
- + utils
- - build_scripts
- - testing
+ - utils
- www
Each of these directories is explained in detail below.
@@ -87,17 +85,15 @@ toplevel ``libc`` directory itself. A test for, say the ``mmap`` function, lives
in the directory ``test/src/sys/mman/`` as implementation of ``mmap`` lives in
``src/sys/mman``.
-The ``www`` directory
+The `utils` directory
---------------------
-The ``www`` directory contains the HTML content of libc.llvm.org
-
-The ``utils/build_scripts`` directory
--------------------------------------
+This directory contains utilities used by other parts of the llvm-libc system.
+See the `README` files, in the sub-directories within this directory, to learn
+about the various utilities.
-This directory contains scripts which support the build system, tooling etc.
+The ``www`` directory
+---------------------
-The ``utils/testing`` directory
--------------------------------
+The ``www`` directory contains the HTML content of libc.llvm.org
-This directory contains testing infrastructure.
diff --git a/libc/utils/CPP/README.md b/libc/utils/CPP/README.md
index 756663e8cc16..4adb15567fe2 100644
--- a/libc/utils/CPP/README.md
+++ b/libc/utils/CPP/README.md
@@ -1,7 +1,9 @@
-This directory contains re-implementations of some C++ standard library as well
-as some LLVM utilities. These are to be used with internal LLVM libc code and
-tests. More utilities will be added on an as needed basis. There are certain
-rules to be followed for future changes and additions:
+This directory contains re-implementations of some C++ standard library
+utilities, as well as some LLVM utilities. These utilities are for use with
+internal LLVM libc code and tests.
+
+More utilities will be added on an as needed basis. There are certain rules to
+be followed for future changes and additions:
1. Only two kind of headers can be included: Other headers from this directory,
and free standing C headers.
diff --git a/libc/utils/HdrGen/README.md b/libc/utils/HdrGen/README.md
new file mode 100644
index 000000000000..a61cf3bacbb0
--- /dev/null
+++ b/libc/utils/HdrGen/README.md
@@ -0,0 +1,5 @@
+# The LLVM libc header generation system
+
+LLVM libc uses a header generation scheme to generate public as well as internal
+header files. This directory contains the implementation of the header generator
+which drives this header generation scheme.
diff --git a/libc/utils/UnitTest/README.md b/libc/utils/UnitTest/README.md
new file mode 100644
index 000000000000..c9096d3e6a1f
--- /dev/null
+++ b/libc/utils/UnitTest/README.md
@@ -0,0 +1,23 @@
+# The LLVM libc unit test framework
+
+This directory contains a lightweight implementation of a
+[gtest](https://github.com/google/googletest) like unit test framework for LLVM
+libc.
+
+## Why not gtest?
+
+While gtest is great, featureful and time tested, it uses the C and C++
+standard libraries. Hence, using it to test LLVM libc (which is also an
+implementation of the C standard libraries) causes various kinds of
+mixup/conflict problems.
+
+## How is it
diff erent from gtest?
+
+LLVM libc's unit test framework is much less featureful as compared to gtest.
+But, what is available strives to be exactly like gtest.
+
+## Will it be made as featurful as gtest in future?
+
+It is not clear if LLVM libc needs/will need every feature of gtest. We only
+intend to extend it on an _as needed_ basis. Hence, it might never be as
+featureful as gtest.
More information about the libc-commits
mailing list