[libc-commits] [libc] 0570de7 - [libc] NFC: Fix trivial typo in comments, documents, and messages

Kazuaki Ishizaki via libc-commits libc-commits at lists.llvm.org
Mon Apr 6 00:19:52 PDT 2020


Author: Kazuaki Ishizaki
Date: 2020-04-06T16:19:34+09:00
New Revision: 0570de73c4822b6b0da4758eefca2a36f01c7445

URL: https://github.com/llvm/llvm-project/commit/0570de73c4822b6b0da4758eefca2a36f01c7445
DIFF: https://github.com/llvm/llvm-project/commit/0570de73c4822b6b0da4758eefca2a36f01c7445.diff

LOG: [libc] NFC: Fix trivial typo in comments, documents, and messages

Differential Revision: https://reviews.llvm.org/D77462

Added: 
    

Modified: 
    libc/AOR_v20.02/math/math_config.h
    libc/AOR_v20.02/math/pow.c
    libc/AOR_v20.02/math/pow_log_data.c
    libc/AOR_v20.02/math/powf.c
    libc/AOR_v20.02/math/test/mathbench.c
    libc/AOR_v20.02/string/aarch64/memchr-sve.S
    libc/AOR_v20.02/string/aarch64/strchr-sve.S
    libc/AOR_v20.02/string/aarch64/strnlen.S
    libc/AOR_v20.02/string/aarch64/strrchr-sve.S
    libc/AOR_v20.02/string/arm/strcpy.c
    libc/docs/header_generation.rst
    libc/docs/implementation_standard.rst
    libc/include/__posix-types.h
    libc/src/signal/linux/CMakeLists.txt
    libc/src/signal/linux/__restore.cpp
    libc/src/stdlib/abort.cpp
    libc/src/string/strlen.cpp
    libc/src/string/x86/memcpy_arch_specific.h.inc
    libc/src/threads/linux/thread_utils.h
    libc/utils/HdrGen/Main.cpp
    libc/utils/UnitTest/README.md
    libc/utils/UnitTest/Test.h
    libc/utils/benchmarks/LibcBenchmark.h
    libc/utils/buildbot/Dockerfile

Removed: 
    


################################################################################
diff  --git a/libc/AOR_v20.02/math/math_config.h b/libc/AOR_v20.02/math/math_config.h
index ea2d59e94ff0..261f44fc2ed0 100644
--- a/libc/AOR_v20.02/math/math_config.h
+++ b/libc/AOR_v20.02/math/math_config.h
@@ -108,7 +108,7 @@ roundtoint (double_t x)
 }
 
 /* Convert x to nearest int in all rounding modes, ties have to be rounded
-   consistently with roundtoint.  If the result is not representible in an
+   consistently with roundtoint.  If the result is not representable in an
    int32_t then the semantics is unspecified.  */
 static inline int32_t
 converttoint (double_t x)
@@ -360,7 +360,7 @@ extern const struct powf_log2_data
    needed for good precision in non-nearest rounding and !TOINT_INTRINSICS.  */
 #define EXP_POLY_WIDE 0
 /* Use close to nearest rounding toint when !TOINT_INTRINSICS.  This may be
-   needed for good precision in non-nearest rouning and !EXP_POLY_WIDE.  */
+   needed for good precision in non-nearest rounding and !EXP_POLY_WIDE.  */
 #define EXP_USE_TOINT_NARROW 0
 #define EXP2_POLY_ORDER 5
 #define EXP2_POLY_WIDE 0

diff  --git a/libc/AOR_v20.02/math/pow.c b/libc/AOR_v20.02/math/pow.c
index acdb23da138e..122f7a2e98ed 100644
--- a/libc/AOR_v20.02/math/pow.c
+++ b/libc/AOR_v20.02/math/pow.c
@@ -58,7 +58,7 @@ log_inline (uint64_t ix, double_t *tail)
   logctail = T[i].logctail;
 
   /* Note: 1/c is j/N or j/N/2 where j is an integer in [N,2N) and
-     |z/c - 1| < 1/N, so r = z/c - 1 is exactly representible.  */
+     |z/c - 1| < 1/N, so r = z/c - 1 is exactly representable.  */
 #if HAVE_FAST_FMA
   r = fma (z, invc, -1.0);
 #else
@@ -348,7 +348,7 @@ pow (double x, double y)
       if (topx == 0)
 	{
 	  /* Normalize subnormal x so exponent becomes negative.  */
-	  /* Without the barrier some versions of clang evalutate the mul
+	  /* Without the barrier some versions of clang evaluate the mul
 	     unconditionally causing spurious overflow exceptions.  */
 	  ix = asuint64 (opt_barrier_double (x) * 0x1p52);
 	  ix &= 0x7fffffffffffffff;

diff  --git a/libc/AOR_v20.02/math/pow_log_data.c b/libc/AOR_v20.02/math/pow_log_data.c
index 445d605228f8..febdb7e67669 100644
--- a/libc/AOR_v20.02/math/pow_log_data.c
+++ b/libc/AOR_v20.02/math/pow_log_data.c
@@ -41,7 +41,7 @@ and z falls into the ith one, then table entries are computed as
 	tab[i].logctail = (double)(log(c) - logc)
 
 where c is chosen near the center of the subinterval such that 1/c has only a
-few precision bits so z/c - 1 is exactly representible as double:
+few precision bits so z/c - 1 is exactly representable as double:
 
 	1/c = center < 1 ? round(N/center)/N : round(2*N/center)/N/2
 

diff  --git a/libc/AOR_v20.02/math/powf.c b/libc/AOR_v20.02/math/powf.c
index 3cb70c0b6288..30a48f949723 100644
--- a/libc/AOR_v20.02/math/powf.c
+++ b/libc/AOR_v20.02/math/powf.c
@@ -26,7 +26,7 @@ relerr_exp2: 1.69 * 2^-34 (Relative error of exp2(ylogx).)
 #define OFF 0x3f330000
 
 /* Subnormal input is normalized so ix has negative biased exponent.
-   Output is multiplied by N (POWF_SCALE) if TOINT_INTRINICS is set.  */
+   Output is multiplied by N (POWF_SCALE) if TOINT_INTRINSICS is set.  */
 static inline double_t
 log2_inline (uint32_t ix)
 {

diff  --git a/libc/AOR_v20.02/math/test/mathbench.c b/libc/AOR_v20.02/math/test/mathbench.c
index a57eddb2b481..3c0a631bce12 100644
--- a/libc/AOR_v20.02/math/test/mathbench.c
+++ b/libc/AOR_v20.02/math/test/mathbench.c
@@ -635,7 +635,7 @@ readtrace (const char *name)
 	FILE *f = strcmp (name, "-") == 0 ? stdin : fopen (name, "r");
 	if (!f)
 	  {
-	    printf ("openning \"%s\" failed: %m\n", name);
+	    printf ("opening \"%s\" failed: %m\n", name);
 	    exit (1);
 	  }
 	for (;;)

diff  --git a/libc/AOR_v20.02/string/aarch64/memchr-sve.S b/libc/AOR_v20.02/string/aarch64/memchr-sve.S
index d9c5fdd18673..4261bf8543f8 100644
--- a/libc/AOR_v20.02/string/aarch64/memchr-sve.S
+++ b/libc/AOR_v20.02/string/aarch64/memchr-sve.S
@@ -48,7 +48,7 @@ __memchr_aarch64_sve:
 	ret
 
 	/* First fault failed: only some of the vector is valid.
-	   Perform the comparision only on the valid bytes.  */
+	   Perform the comparison only on the valid bytes.  */
 2:	cmpeq	p2.b, p0/z, z0.b, z1.b
 	b.any	1b
 

diff  --git a/libc/AOR_v20.02/string/aarch64/strchr-sve.S b/libc/AOR_v20.02/string/aarch64/strchr-sve.S
index 3f7d782c0027..7a98ee19244e 100644
--- a/libc/AOR_v20.02/string/aarch64/strchr-sve.S
+++ b/libc/AOR_v20.02/string/aarch64/strchr-sve.S
@@ -57,7 +57,7 @@ FUNC:
 	ret
 
 	/* First fault failed: only some of the vector is valid.
-	   Perform the comparision only on the valid bytes.  */
+	   Perform the comparison only on the valid bytes.  */
 2:	cmpeq	p2.b, p0/z, z0.b, z1.b		/* search for c */
 	cmpeq	p3.b, p0/z, z0.b, 0		/* search for 0 */
 	orrs	p4.b, p0/z, p2.b, p3.b		/* c | 0 */

diff  --git a/libc/AOR_v20.02/string/aarch64/strnlen.S b/libc/AOR_v20.02/string/aarch64/strnlen.S
index 72b74563a5a7..9b03518ab76d 100644
--- a/libc/AOR_v20.02/string/aarch64/strnlen.S
+++ b/libc/AOR_v20.02/string/aarch64/strnlen.S
@@ -67,7 +67,7 @@ ENTRY_ALIGN (__strnlen_aarch64, 0)
 	   especially on cores with a high number of issue slots per
 	   cycle, as we get much better parallelism out of the operations.  */
 
-	/* Start of critial section -- keep to one 64Byte cache line.  */
+	/* Start of critical section -- keep to one 64Byte cache line.  */
 L(loop):
 	ldp	data1, data2, [src], #16
 L(realigned):

diff  --git a/libc/AOR_v20.02/string/aarch64/strrchr-sve.S b/libc/AOR_v20.02/string/aarch64/strrchr-sve.S
index 0b4fcb065631..c04be74068ed 100644
--- a/libc/AOR_v20.02/string/aarch64/strrchr-sve.S
+++ b/libc/AOR_v20.02/string/aarch64/strrchr-sve.S
@@ -46,7 +46,7 @@ __strrchr_aarch64_sve:
 	b	0b
 
 	/* First fault failed: only some of the vector is valid.
-	   Perform the comparisions only on the valid bytes.  */
+	   Perform the comparisons only on the valid bytes.  */
 1:	cmpeq	p3.b, p0/z, z0.b, 0	/* search for 0 */
 	b.any	2f
 

diff  --git a/libc/AOR_v20.02/string/arm/strcpy.c b/libc/AOR_v20.02/string/arm/strcpy.c
index ce472ced2c45..7df23a62f6df 100644
--- a/libc/AOR_v20.02/string/arm/strcpy.c
+++ b/libc/AOR_v20.02/string/arm/strcpy.c
@@ -120,7 +120,7 @@ __strcpy_arm (char* dst, const char* src)
        "bne	5b\n\t"
        "BX LR\n"
 
-       /* src and dst do not have a common word-alignement.  Fall back to
+       /* src and dst do not have a common word-alignment.  Fall back to
 	  byte copying.  */
   "4:\n\t"
        "ldrb	r2, [r1], #1\n\t"

diff  --git a/libc/docs/header_generation.rst b/libc/docs/header_generation.rst
index 5a2948518c4d..fc749cabbae3 100644
--- a/libc/docs/header_generation.rst
+++ b/libc/docs/header_generation.rst
@@ -20,7 +20,7 @@ reading a ``.h.def`` file, the header generation tool does two things:
 
 1. Copy the lines not containing commands as is into the output ``.h`` file.
 2. Replace the line on which a command occurs with some other text as directed
-   by the command. The replacment text can span multiple lines.
+   by the command. The replacement text can span multiple lines.
 
 Command syntax
 ~~~~~~~~~~~~~~
@@ -59,7 +59,7 @@ Available Commands
 ------------------
 
 Sub-sections below describe the commands currently available. Under each command
-is the discription of the arugments to the command, and the action taken by the
+is the description of the arguments to the command, and the action taken by the
 header generation tool when processing a command.
 
 ``include_file``

diff  --git a/libc/docs/implementation_standard.rst b/libc/docs/implementation_standard.rst
index bba4fe6c9af5..87cee06adf2e 100644
--- a/libc/docs/implementation_standard.rst
+++ b/libc/docs/implementation_standard.rst
@@ -22,8 +22,8 @@ implementation header file will be ``src/math/round/round.h``. The rest of this
 document explains the structure of implementation header files and ``.cpp``
 files.
 
-Implementaion Header File Structure
------------------------------------
+Implementation Header File Structure
+------------------------------------
 
 We will use the ``round`` function from the public ``math.h`` header file as an
 example. The ``round`` function will be declared in an internal header file
@@ -82,4 +82,4 @@ a post build step. For example, for the ``round`` function, one can use
 NOTE: We use a post build ``objcopy`` step to add an alias instead of using
 the ``__attribute__((alias))``. For C++, this ``alias`` attribute requires
 mangled names of the referees. Using the post build ``objcopy`` step helps
-us avoid putting mangled names with ``alias`` atttributes.
+us avoid putting mangled names with ``alias`` attributes.

diff  --git a/libc/include/__posix-types.h b/libc/include/__posix-types.h
index 0cbe623ce27c..2e1119fadbae 100644
--- a/libc/include/__posix-types.h
+++ b/libc/include/__posix-types.h
@@ -8,7 +8,7 @@
 
 // This header file does not have a header guard. It is internal to LLVM libc
 // and intended to be used to pick specific definitions without polluting the
-// public headers with unneccesary definitions.
+// public headers with unnecessary definitions.
 
 #if defined(__need_off_t) && !defined(__llvm_libc_off_t_defined)
 typedef __INT64_TYPE__ off_t;

diff  --git a/libc/src/signal/linux/CMakeLists.txt b/libc/src/signal/linux/CMakeLists.txt
index 7992703a42d2..0c71f9095a8e 100644
--- a/libc/src/signal/linux/CMakeLists.txt
+++ b/libc/src/signal/linux/CMakeLists.txt
@@ -22,7 +22,7 @@ add_object_library(
     -Wframe-larger-than=0
     -Werror
     -Wno-attributes
-    # asan creates asan.module_ctor which uses stack space, causing warinngs.
+    # asan creates asan.module_ctor which uses stack space, causing warnings.
     -fno-sanitize=address
   DEPENDS
     linux_syscall_h

diff  --git a/libc/src/signal/linux/__restore.cpp b/libc/src/signal/linux/__restore.cpp
index 8d99d6abb014..8b3e5c7f4b5b 100644
--- a/libc/src/signal/linux/__restore.cpp
+++ b/libc/src/signal/linux/__restore.cpp
@@ -6,7 +6,7 @@
 //
 //===----------------------------------------------------------------------===//
 
-// This file is implemented seperately from sigaction.cpp so that we can
+// This file is implemented separately from sigaction.cpp so that we can
 // strongly control the options this file is compiled with. __restore_rt cannot
 // make any stack allocations so we must ensure this.
 

diff  --git a/libc/src/stdlib/abort.cpp b/libc/src/stdlib/abort.cpp
index 777e3fd649ec..4012ec09562c 100644
--- a/libc/src/stdlib/abort.cpp
+++ b/libc/src/stdlib/abort.cpp
@@ -19,9 +19,9 @@ void LLVM_LIBC_ENTRYPOINT(abort)() {
   // Unblock SIGABRT, raise it, if it was ignored or the handler returned,
   // change its action to SIG_DFL, raise it again.
   // TODO: When C11 mutexes land:
-  // Aquire recursive mutex (in case the current signal handler for SIGABRT
+  // Acquire recursive mutex (in case the current signal handler for SIGABRT
   // itself calls abort we don't want to deadlock on the same thread trying
-  // to aquire it's own mutex.)
+  // to acquire it's own mutex.)
   __llvm_libc::raise(SIGABRT);
   __llvm_libc::raise(SIGKILL);
   __llvm_libc::_Exit(127);

diff  --git a/libc/src/string/strlen.cpp b/libc/src/string/strlen.cpp
index 3aeafc37bcc8..ec4b2a0c7a70 100644
--- a/libc/src/string/strlen.cpp
+++ b/libc/src/string/strlen.cpp
@@ -13,7 +13,7 @@
 namespace __llvm_libc {
 
 // TODO: investigate the performance of this function.
-// There might be potential for compiler optmization.
+// There might be potential for compiler optimization.
 size_t LLVM_LIBC_ENTRYPOINT(strlen)(const char *src) {
   const char *end = src;
   while (*end != '\0')

diff  --git a/libc/src/string/x86/memcpy_arch_specific.h.inc b/libc/src/string/x86/memcpy_arch_specific.h.inc
index ace98ba2e811..60610d4c73d2 100644
--- a/libc/src/string/x86/memcpy_arch_specific.h.inc
+++ b/libc/src/string/x86/memcpy_arch_specific.h.inc
@@ -4,7 +4,7 @@ namespace __llvm_libc {
 
 static void CopyRepMovsb(char *__restrict dst, const char *__restrict src,
                          size_t count) {
-  // FIXME: Add MSVC suppport with
+  // FIXME: Add MSVC support with
   // #include <intrin.h>
   // __movsb(reinterpret_cast<unsigned char *>(dst),
   //         reinterpret_cast<const unsigned char *>(src), count);

diff  --git a/libc/src/threads/linux/thread_utils.h b/libc/src/threads/linux/thread_utils.h
index 37198ad0afb4..202075824068 100644
--- a/libc/src/threads/linux/thread_utils.h
+++ b/libc/src/threads/linux/thread_utils.h
@@ -19,7 +19,7 @@ namespace __llvm_libc {
 // The futex data has to be exactly 4 bytes long. However, we use a uint type
 // here as we do not want to use `_Atomic uint32_t` as the _Atomic keyword which
 // is C only. The header stdatomic.h does not define an atomic type
-// corresponding to `uint32_t` or to something which is exaclty 4 bytes wide.
+// corresponding to `uint32_t` or to something which is exactly 4 bytes wide.
 using FutexData = atomic_uint;
 
 // We use a tri-state mutex because we want to avoid making syscalls

diff  --git a/libc/utils/HdrGen/Main.cpp b/libc/utils/HdrGen/Main.cpp
index 779705c1930b..57c3d81e558b 100644
--- a/libc/utils/HdrGen/Main.cpp
+++ b/libc/utils/HdrGen/Main.cpp
@@ -25,7 +25,7 @@ llvm::cl::opt<std::string> StandardHeader(
     llvm::cl::desc("The standard header file which is to be generated."),
     llvm::cl::value_desc("<header file>"));
 llvm::cl::list<std::string> ReplacementValues(
-    "args", llvm::cl::desc("Command seperated <argument name>=<value> pairs."),
+    "args", llvm::cl::desc("Command separated <argument name>=<value> pairs."),
     llvm::cl::value_desc("<name=value>[,name=value]"));
 
 void ParseArgValuePairs(std::unordered_map<std::string, std::string> &Map) {

diff  --git a/libc/utils/UnitTest/README.md b/libc/utils/UnitTest/README.md
index c9096d3e6a1f..66a6ccf572dd 100644
--- a/libc/utils/UnitTest/README.md
+++ b/libc/utils/UnitTest/README.md
@@ -16,7 +16,7 @@ mixup/conflict problems.
 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?
+## Will it be made as featureful 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

diff  --git a/libc/utils/UnitTest/Test.h b/libc/utils/UnitTest/Test.h
index 3c042de4c12d..cd1489446b92 100644
--- a/libc/utils/UnitTest/Test.h
+++ b/libc/utils/UnitTest/Test.h
@@ -25,7 +25,7 @@ class RunContext;
 // a TRUE or FALSE condition. That is because, C library funtions do not
 // return boolean values, but use integral return values to indicate true or
 // false conditions. Hence, it is more appropriate to use the other comparison
-// condtions for such cases.
+// conditions for such cases.
 enum TestCondition {
   Cond_None,
   Cond_EQ,

diff  --git a/libc/utils/benchmarks/LibcBenchmark.h b/libc/utils/benchmarks/LibcBenchmark.h
index 8c2e9b8022b0..6f6d1f48968f 100644
--- a/libc/utils/benchmarks/LibcBenchmark.h
+++ b/libc/utils/benchmarks/LibcBenchmark.h
@@ -174,7 +174,7 @@ class RuntimeEstimationProgression {
 //
 // Note: The benchmark is not responsible for serializing the executions of
 // `foo`. It is not suitable for measuring, very small & side effect free
-// functions, as the processor is free to execute serveral executions in
+// functions, as the processor is free to execute several executions in
 // parallel.
 //
 // - Options: A set of parameters controlling the stopping conditions for the

diff  --git a/libc/utils/buildbot/Dockerfile b/libc/utils/buildbot/Dockerfile
index b63c11793921..c5edd1ac36a7 100644
--- a/libc/utils/buildbot/Dockerfile
+++ b/libc/utils/buildbot/Dockerfile
@@ -1,6 +1,6 @@
 FROM debian:10
 
-# Installing dependecies.
+# Installing dependencies.
 RUN dpkg --add-architecture i386
 RUN apt-get update
 RUN apt-get install -y build-essential clang subversion git vim \
@@ -8,7 +8,7 @@ RUN apt-get install -y build-essential clang subversion git vim \
   ninja-build
 RUN python -m pip install buildbot-slave==0.8.12
 
-# Temporary dependecies for AOR tests.
+# Temporary dependencies for AOR tests.
 RUN apt-get install -y libmpfr-dev libmpc-dev
 
 # Change linker to gold.


        


More information about the libc-commits mailing list