[libc][NFC] Strip all training whitespace and missing newlines (#124163)

This commit is contained in:
Joseph Huber
2025-01-23 12:02:54 -06:00
committed by GitHub
parent 0290693165
commit db6b7a84e6
40 changed files with 67 additions and 67 deletions

View File

@@ -31,4 +31,4 @@ As identified in the [automemcpy](https://research.google/pubs/pub50338/) paper:
## Note
Except for `GoogleD`, all distributions are gathered over one week worth of data.
Except for `GoogleD`, all distributions are gathered over one week worth of data.

View File

@@ -10,7 +10,7 @@ function(add_benchmark benchmark_name)
"LINK_LIBRARIES;DEPENDS" # Multi-value arguments
${ARGN}
)
if(NOT libc.src.time.clock IN_LIST TARGET_LLVMLIBC_ENTRYPOINTS)
message(FATAL_ERROR "target does not support clock")
endif()

View File

@@ -463,7 +463,7 @@ if(LIBC_COMPILER_HAS_FIXED_POINT)
libc.src.stdfix.kbits
libc.src.stdfix.ukbits
libc.src.stdfix.lkbits
libc.src.stdfix.ulkbits
libc.src.stdfix.ulkbits
)
endif()

View File

@@ -439,7 +439,7 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.fabs
libc.src.math.fabsf
libc.src.math.fabsl
libc.src.math.fadd
libc.src.math.fadd
libc.src.math.faddl
libc.src.math.fadd
libc.src.math.fdim

View File

@@ -215,7 +215,7 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.complex.cproj
libc.src.complex.cprojf
libc.src.complex.cprojl
# fenv.h entrypoints
libc.src.fenv.feclearexcept
libc.src.fenv.fedisableexcept
@@ -268,7 +268,7 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.fabs
libc.src.math.fabsf
libc.src.math.fabsl
libc.src.math.fadd
libc.src.math.fadd
libc.src.math.faddl
libc.src.math.fadd
libc.src.math.fdim

View File

@@ -432,7 +432,7 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.fabs
libc.src.math.fabsf
libc.src.math.fabsl
libc.src.math.fadd
libc.src.math.fadd
libc.src.math.faddl
libc.src.math.fadd
libc.src.math.fdim
@@ -630,7 +630,7 @@ if(LIBC_TYPES_HAS_CFLOAT128)
)
endif()
if(LIBC_TYPES_HAS_FLOAT128)
if(LIBC_TYPES_HAS_FLOAT128)
list(APPEND TARGET_LIBM_ENTRYPOINTS
# math.h C23 _Float128 entrypoints
libc.src.math.canonicalizef128

View File

@@ -377,7 +377,7 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.complex.cproj
libc.src.complex.cprojf
libc.src.complex.cprojl
# fenv.h entrypoints
libc.src.fenv.feclearexcept
libc.src.fenv.fedisableexcept
@@ -440,7 +440,7 @@ set(TARGET_LIBM_ENTRYPOINTS
libc.src.math.fabs
libc.src.math.fabsf
libc.src.math.fabsl
libc.src.math.fadd
libc.src.math.fadd
libc.src.math.faddl
libc.src.math.fadd
libc.src.math.fdim
@@ -756,7 +756,7 @@ if(LIBC_TYPES_HAS_CFLOAT128)
endif()
if(LIBC_TYPES_HAS_FLOAT128)
list(APPEND TARGET_LIBM_ENTRYPOINTS
list(APPEND TARGET_LIBM_ENTRYPOINTS
# math.h C23 _Float128 entrypoints
libc.src.math.canonicalizef128
libc.src.math.ceilf128

View File

@@ -173,7 +173,7 @@ If a number passed as a field width or precision value is out of range for an
int, then it will be treated as the largest value in the int range
(e.g. "%-999999999999.999999999999s" is the same as "%-2147483647.2147483647s").
If the field width is set to INT_MIN by using the '*' form,
If the field width is set to INT_MIN by using the '*' form,
e.g. printf("%*d", INT_MIN, 1), it will be treated as INT_MAX, since -INT_MIN is
not representable as an int.

View File

@@ -78,8 +78,8 @@ POSIX.1 leaves that when the name of a shared memory object does not begin with
Handling of NULL arguments to the 's' format specifier
------------------------------------------------------
The C standard does not specify behavior for ``printf("%s", NULL)``. We will
print the string literal ``(null)`` unless using the
``LIBC_COPT_PRINTF_NO_NULLPTR_CHECKS`` option described in :ref:`printf
print the string literal ``(null)`` unless using the
``LIBC_COPT_PRINTF_NO_NULLPTR_CHECKS`` option described in :ref:`printf
behavior<printf_behavior>`.
Unknown Math Rounding Direction

View File

@@ -253,7 +253,7 @@ linked in by forwarding the static library to the device-side link job.
Extensions
----------
The opcode is a 32-bit integer that must be unique to the requested operation.
All opcodes used by ``libc`` internally have the character ``c`` in the most
The opcode is a 32-bit integer that must be unique to the requested operation.
All opcodes used by ``libc`` internally have the character ``c`` in the most
significant byte. Any other opcode is available for use outside of the ``libc``
implementation.

View File

@@ -12,7 +12,7 @@ For Linux, we support kernel versions as listed on
date), ``stable``, and ``mainline`` versions. We actively adopt new features
from ``linux-next``.
For Windows, we plan to support products within their lifecycle. Please refer to
For Windows, we plan to support products within their lifecycle. Please refer to
`Search Product and Services Lifecycle Information <https://learn.microsoft.com/en-us/lifecycle/products/?products=windows>`_ for more information.
LLVM-libc does not guarantee backward compatibility with operating systems that

View File

@@ -22,7 +22,7 @@ add_libc_fuzzer(
libc.src.__support.HashTable.table
COMPILE_OPTIONS
-D__LIBC_EXPLICIT_SIMD_OPT
)
)
# TODO: FreeListHeap uses the _end symbol which conflicts with the _end symbol
# defined by GPU start.cpp files so for now we exclude this fuzzer on GPU.

View File

@@ -102,15 +102,15 @@ add_header(__getoptargv_t HDR __getoptargv_t.h)
add_header(wchar_t HDR wchar_t.h)
add_header(char8_t HDR char8_t.h)
add_header(
char16_t
HDR
char16_t
HDR
char16_t.h
DEPENDS
libc.include.llvm-libc-macros.stdint_macros
)
add_header(
char32_t
HDR
char32_t
HDR
char32_t.h
DEPENDS
libc.include.llvm-libc-macros.stdint_macros
@@ -145,8 +145,8 @@ add_header(cfloat16 HDR cfloat16.h)
add_header(fsblkcnt_t HDR fsblkcnt_t.h)
add_header(fsfilcnt_t HDR fsfilcnt_t.h)
add_header(
struct_statvfs
HDR
struct_statvfs
HDR
struct_statvfs.h
DEPENDS
.fsblkcnt_t

View File

@@ -1,7 +1,7 @@
header: stdfix.h
header_template: stdfix.h.def
macros: []
types:
types:
- type_name: stdfix-types
enums: []
objects: []

View File

@@ -1,7 +1,7 @@
header: sys/uio.h
header_template: uio.h.def
macros: []
types:
types:
- type_name: struct_iovec
- type_name: ssize_t
enums: []

View File

@@ -83,7 +83,7 @@ add_header_library(
.string_view
libc.hdr.func.free
libc.hdr.func.malloc
libc.hdr.func.realloc
libc.hdr.func.realloc
libc.src.__support.common
libc.src.__support.integer_to_string
libc.src.string.memory_utils.inline_memcpy
@@ -203,7 +203,7 @@ add_object_library(
DEPENDS
libc.hdr.func.free
libc.hdr.func.malloc
libc.hdr.func.aligned_alloc
libc.hdr.func.aligned_alloc
libc.src.__support.common
libc.src.__support.macros.properties.os
)

View File

@@ -79,7 +79,7 @@ add_object_library(
.futex_utils
libc.config.app_h
libc.include.sys_syscall
libc.hdr.fcntl_macros
libc.hdr.fcntl_macros
libc.src.errno.errno
libc.src.__support.CPP.atomic
libc.src.__support.CPP.stringstream

View File

@@ -34,7 +34,7 @@ public:
// .LBB0_2: | jmp .LBB0_4
// isb | .LBB0_2:
// .LBB0_3: | pause
// ldrb w9, [x0] | .LBB0_3:
// ldrb w9, [x0] | .LBB0_3:
// tbnz w9, #0, .LBB0_2 | movzx eax, byte ptr [rdi]
// b .LBB0_1 | test al, 1
// .LBB0_4: | jne .LBB0_2

View File

@@ -1,5 +1,5 @@
add_header_library(
performance_counter
performance_counter
HDRS
performance_counter.h
DEPENDS

View File

@@ -9,7 +9,7 @@ if(CUDAToolkit_FOUND)
if (EXISTS ${libdevice_path})
message(STATUS "Found the CUDA device library. Implementations falling back "
"to the vendor libraries will be resolved statically.")
set(bitcode_link_flags
set(bitcode_link_flags
"SHELL:-Xclang -mlink-builtin-bitcode -Xclang ${libdevice_path}")
endif()
else()

View File

@@ -539,7 +539,7 @@ add_entrypoint_object(
libc.src.__support.OSUtil.osutil
)
# TODO: Move all exit functions to linux specific
# TODO: Move all exit functions to linux specific
if(TARGET libc.src.__support.threads.mutex)
add_header_library(
@@ -563,7 +563,7 @@ add_entrypoint_object(
HDRS
atexit.h
CXX_STANDARD
20 # For constinit
20 # For constinit
DEPENDS
.exit_handler
)
@@ -575,7 +575,7 @@ add_entrypoint_object(
HDRS
at_quick_exit.h
CXX_STANDARD
20 # For constinit
20 # For constinit
DEPENDS
.exit_handler
.atexit

View File

@@ -16,7 +16,7 @@ add_libc_test(
DEPENDS
libc.include.stdio
libc.hdr.types.size_t
libc.src.errno.errno
libc.src.errno.errno
libc.src.__support.CPP.new
libc.src.__support.File.file
)

View File

@@ -104,7 +104,7 @@ add_fp_unittest(
SRCS
sinf16_test.cpp
DEPENDS
libc.src.math.sinf16
libc.src.math.sinf16
)
add_fp_unittest(
@@ -198,7 +198,7 @@ add_fp_unittest(
SRCS
tanf16_test.cpp
DEPENDS
libc.src.math.tanf16
libc.src.math.tanf16
)
add_fp_unittest(

View File

@@ -129,7 +129,7 @@ add_fp_unittest(
tanf16_test.cpp
DEPENDS
libc.src.errno.errno
libc.src.math.tanf16
libc.src.math.tanf16
)
add_fp_unittest(

View File

@@ -62,7 +62,7 @@ add_libc_unittest(
sigaddset_test.cpp
DEPENDS
libc.include.signal
libc.src.errno.errno
libc.src.errno.errno
libc.src.signal.sigaddset
libc.test.UnitTest.ErrnoSetterMatcher
)
@@ -89,7 +89,7 @@ add_libc_unittest(
sigfillset_test.cpp
DEPENDS
libc.include.signal
libc.src.errno.errno
libc.src.errno.errno
libc.src.signal.raise
libc.src.signal.sigfillset
libc.src.signal.sigprocmask
@@ -104,7 +104,7 @@ add_libc_unittest(
sigdelset_test.cpp
DEPENDS
libc.include.signal
libc.src.errno.errno
libc.src.errno.errno
libc.src.signal.raise
libc.src.signal.sigdelset
libc.src.signal.sigfillset

View File

@@ -57,7 +57,7 @@ foreach(suffix IN ITEMS hr r lr hk k lk uhr ur ulr uhk uk ulk)
libc.src.stdfix.round${suffix}
libc.src.__support.fixed_point.fx_bits
)
add_libc_test(
${suffix}bits_test
SUITE

View File

@@ -11,7 +11,7 @@ add_libc_unittest(
DEPENDS
libc.include.fcntl
libc.include.sys_resource
libc.src.errno.errno
libc.src.errno.errno
libc.src.fcntl.open
libc.src.sys.resource.getrlimit
libc.src.sys.resource.setrlimit

View File

@@ -9,7 +9,7 @@ add_libc_unittest(
select_ui_test.cpp
DEPENDS
libc.include.unistd
libc.src.errno.errno
libc.src.errno.errno
libc.src.sys.select.select
libc.src.unistd.read
)
@@ -22,7 +22,7 @@ add_libc_unittest(
select_failure_test.cpp
DEPENDS
libc.include.unistd
libc.src.errno.errno
libc.src.errno.errno
libc.src.sys.select.select
libc.src.unistd.read
libc.test.UnitTest.ErrnoSetterMatcher

View File

@@ -11,7 +11,7 @@ add_libc_unittest(
DEPENDS
libc.hdr.fcntl_macros
libc.include.sys_stat
libc.src.errno.errno
libc.src.errno.errno
libc.src.fcntl.open
libc.src.sys.sendfile.sendfile
libc.src.unistd.close

View File

@@ -8,7 +8,7 @@ add_libc_unittest(
waitpid_test.cpp
DEPENDS
libc.include.sys_wait
libc.src.errno.errno
libc.src.errno.errno
libc.src.sys.wait.waitpid
)
@@ -20,6 +20,6 @@ add_libc_unittest(
wait4_test.cpp
DEPENDS
libc.include.sys_wait
libc.src.errno.errno
libc.src.errno.errno
libc.src.sys.wait.wait4
)

View File

@@ -29,7 +29,7 @@ add_libc_unittest(
libc.src.errno.errno
libc.src.unistd.chdir
libc.src.unistd.close
libc.src.fcntl.open
libc.src.fcntl.open
libc.test.UnitTest.ErrnoSetterMatcher
)
@@ -427,7 +427,7 @@ add_libc_unittest(
libc.include.unistd
libc.hdr.fcntl_macros
libc.include.sys_syscall
libc.src.errno.errno
libc.src.errno.errno
libc.src.unistd.__llvm_libc_syscall
libc.test.UnitTest.ErrnoSetterMatcher
)

View File

@@ -15,7 +15,7 @@ macros:
in-latest-posix: ''
LIO_WRITE:
in-latest-posix: ''
functions:
aio_cancel:
in-latest-posix: ''

View File

@@ -10,4 +10,4 @@ functions:
macros:
IF_NAMESIZE:
in-latest-posix: ''
in-latest-posix: ''

View File

@@ -56,4 +56,4 @@ macros:
IN6_IS_ADDR_MC_ORGLOCAL:
in-latest-posix: ''
IN6_IS_ADDR_MC_GLOBAL:
in-latest-posix: ''
in-latest-posix: ''

View File

@@ -40,4 +40,4 @@ macros:
RUSAGE_SELF:
in-latest-posix: ''
RUSAGE_CHILDREN:
in-latest-posix: ''
in-latest-posix: ''

View File

@@ -42,7 +42,7 @@ macros:
in-latest-posix: ''
S_IXGRP:
in-latest-posix: ''
S_IRWXO:
in-latest-posix: ''
S_IROTH:
@@ -115,4 +115,4 @@ functions:
umask:
in-latest-posix: ''
utimensat:
in-latest-posix: ''
in-latest-posix: ''

View File

@@ -2,4 +2,4 @@ functions:
select:
in-latest-posix: ''
utimes:
in-latest-posix: ''
in-latest-posix: ''

View File

@@ -34,4 +34,4 @@ macros:
WUNTRACED:
in-latest-posix: ''
WCORE_DUMPED:
in-latest-posix: ''
in-latest-posix: ''

View File

@@ -31,7 +31,7 @@ macros:
in-latest-posix: ''
IGNBRK:
in-latest-posix: ''
IGNCR:
IGNCR:
in-latest-posix: ''
IGNPAR:
in-latest-posix: ''
@@ -64,7 +64,7 @@ macros:
in-latest-posix: ''
OFILL:
in-latest-posix: ''
NLDLY:
in-latest-posix: ''
NL0:
@@ -139,7 +139,7 @@ macros:
in-latest-posix: ''
B2400:
in-latest-posix: ''
B4800:
B4800:
in-latest-posix: ''
B9600:
in-latest-posix: ''
@@ -231,13 +231,13 @@ functions:
in-latest-posix: ''
tcgetattr:
in-latest-posix: ''
tcgetsid:
tcgetsid:
in-latest-posix: ''
tcgetwinsize:
in-latest-posix: ''
tcsendbreak:
in-latest-posix: ''
tcsetattr:
tcsetattr:
in-latest-posix: ''
tcsetwinsize:
in-latest-posix: ''
in-latest-posix: ''

View File

@@ -1,6 +1,6 @@
// Implement WorstCase functions to compute the worst case for x mod C, with
// the exponent of x ranges from emin to emax, and precision of x is p.
// Adapted to Sollya from the Maple function in
// Adapted to Sollya from the Maple function in
// J-M. Muller, "Elementary Functions", 3rd ed, Section 11.3.2.
//
// Some examples:
@@ -8,7 +8,7 @@
// 1) Worst case for trig range reduction fast passes:
//
// Single precision
// > WorstCase(24, -6, 32, pi/32, 128);
// > WorstCase(24, -6, 32, pi/32, 128);
// numbermin : 10741887
// expmin : 7
// Worst case: 0x1.47d0fep30