Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[libc] Mass replace enclosing namespace #67032

Merged
merged 1 commit into from
Sep 26, 2023
Merged

Conversation

@llvmbot
Copy link
Member

llvmbot commented Sep 21, 2023

@llvm/pr-subscribers-backend-amdgpu

@llvm/pr-subscribers-libc

Changes

This is step 4 of https://discourse.llvm.org/t/rfc-customizable-namespace-to-allow-testing-the-libc-when-the-system-libc-is-also-llvms-libc/73079


Patch is 1.99 MiB, truncated to 20.00 KiB below, full version: https://github.com/llvm/llvm-project/pull/67032.diff

2041 Files Affected:

  • (modified) libc/benchmarks/CMakeLists.txt (+1-1)
  • (modified) libc/benchmarks/LibcDefaultImplementations.cpp (+8-8)
  • (modified) libc/benchmarks/LibcMemoryBenchmark.h (+1-1)
  • (modified) libc/benchmarks/LibcMemoryBenchmarkMain.cpp (+2-2)
  • (modified) libc/benchmarks/automemcpy/lib/CodeGen.cpp (+6-6)
  • (modified) libc/benchmarks/automemcpy/unittests/CodeGenTest.cpp (+12-12)
  • (modified) libc/config/linux/app.h (+2-2)
  • (modified) libc/docs/dev/clang_tidy_checks.rst (+8-8)
  • (modified) libc/docs/dev/code_style.rst (+1-1)
  • (modified) libc/docs/dev/implementation_standard.rst (+6-6)
  • (modified) libc/fuzzing/math/Compare.h (+5-4)
  • (modified) libc/fuzzing/math/RemQuoDiff.h (+2-2)
  • (modified) libc/fuzzing/math/math_differential_fuzz.cpp (+49-43)
  • (modified) libc/fuzzing/math/nextafter_differential_fuzz.cpp (+2-2)
  • (modified) libc/fuzzing/stdio/printf_float_conv_fuzz.cpp (+5-5)
  • (modified) libc/fuzzing/stdio/printf_parser_fuzz.cpp (+1-1)
  • (modified) libc/fuzzing/stdlib/atof_differential_fuzz.cpp (+2-1)
  • (modified) libc/fuzzing/stdlib/qsort_fuzz.cpp (+1-1)
  • (modified) libc/fuzzing/stdlib/strtofloat_fuzz.cpp (+5-5)
  • (modified) libc/fuzzing/stdlib/strtointeger_differential_fuzz.cpp (+7-7)
  • (modified) libc/fuzzing/stdlib/strtointeger_fuzz.cpp (+9-7)
  • (modified) libc/fuzzing/string/strcmp_fuzz.cpp (+2-2)
  • (modified) libc/fuzzing/string/strcpy_fuzz.cpp (+1-1)
  • (modified) libc/fuzzing/string/strstr_fuzz.cpp (+3-3)
  • (modified) libc/include/llvm-libc-macros/linux/unistd-macros.h (+4-3)
  • (modified) libc/src/__support/CPP/README.md (+1-1)
  • (modified) libc/src/__support/CPP/algorithm.h (+2-2)
  • (modified) libc/src/__support/CPP/array.h (+4-3)
  • (modified) libc/src/__support/CPP/atomic.h (+2-2)
  • (modified) libc/src/__support/CPP/bit.h (+2-2)
  • (modified) libc/src/__support/CPP/bitset.h (+3-3)
  • (modified) libc/src/__support/CPP/cstddef.h (+2-2)
  • (modified) libc/src/__support/CPP/expected.h (+2-2)
  • (modified) libc/src/__support/CPP/functional.h (+2-2)
  • (modified) libc/src/__support/CPP/limits.h (+2-2)
  • (modified) libc/src/__support/CPP/new.h (+18-18)
  • (modified) libc/src/__support/CPP/optional.h (+2-2)
  • (modified) libc/src/__support/CPP/span.h (+2-2)
  • (modified) libc/src/__support/CPP/string.h (+3-3)
  • (modified) libc/src/__support/CPP/string_view.h (+2-2)
  • (modified) libc/src/__support/CPP/stringstream.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/add_lvalue_reference.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/add_pointer.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/add_rvalue_reference.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/always_false.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/bool_constant.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/conditional.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/decay.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/enable_if.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/false_type.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/integral_constant.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/invoke.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/invoke_result.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/is_arithmetic.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/is_array.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/is_base_of.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/is_class.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/is_const.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/is_convertible.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/is_destructible.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/is_enum.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/is_floating_point.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/is_function.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/is_integral.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/is_lvalue_reference.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/is_member_pointer.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/is_null_pointer.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/is_object.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/is_pointer.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/is_reference.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/is_rvalue_reference.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/is_same.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/is_scalar.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/is_signed.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/is_trivially_constructible.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/is_trivially_copyable.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/is_trivially_destructible.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/is_union.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/is_unsigned.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/is_void.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/make_signed.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/make_unsigned.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/remove_all_extents.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/remove_cv.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/remove_cvref.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/remove_extent.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/remove_reference.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/true_type.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/type_identity.h (+2-2)
  • (modified) libc/src/__support/CPP/type_traits/void_t.h (+2-2)
  • (modified) libc/src/__support/CPP/utility/declval.h (+2-2)
  • (modified) libc/src/__support/CPP/utility/forward.h (+2-2)
  • (modified) libc/src/__support/CPP/utility/in_place.h (+2-2)
  • (modified) libc/src/__support/CPP/utility/integer_sequence.h (+2-2)
  • (modified) libc/src/__support/CPP/utility/move.h (+2-2)
  • (modified) libc/src/__support/FPUtil/BasicOperations.h (+2-2)
  • (modified) libc/src/__support/FPUtil/DivisionAndRemainderOperations.h (+5-5)
  • (modified) libc/src/__support/FPUtil/FEnvImpl.h (+4-4)
  • (modified) libc/src/__support/FPUtil/FMA.h (+2-2)
  • (modified) libc/src/__support/FPUtil/FPBits.h (+2-2)
  • (modified) libc/src/__support/FPUtil/FloatProperties.h (+2-2)
  • (modified) libc/src/__support/FPUtil/Hypot.h (+2-2)
  • (modified) libc/src/__support/FPUtil/ManipulationFunctions.h (+2-2)
  • (modified) libc/src/__support/FPUtil/NearestIntegerOperations.h (+2-2)
  • (modified) libc/src/__support/FPUtil/NormalFloat.h (+2-2)
  • (modified) libc/src/__support/FPUtil/PolyEval.h (+2-2)
  • (modified) libc/src/__support/FPUtil/XFloat.h (+2-2)
  • (modified) libc/src/__support/FPUtil/aarch64/FEnvImpl.h (+2-2)
  • (modified) libc/src/__support/FPUtil/aarch64/FMA.h (+2-2)
  • (modified) libc/src/__support/FPUtil/aarch64/fenv_darwin_impl.h (+2-2)
  • (modified) libc/src/__support/FPUtil/aarch64/nearest_integer.h (+2-2)
  • (modified) libc/src/__support/FPUtil/aarch64/sqrt.h (+2-2)
  • (modified) libc/src/__support/FPUtil/arm/FEnvImpl.h (+2-2)
  • (modified) libc/src/__support/FPUtil/double_double.h (+3-3)
  • (modified) libc/src/__support/FPUtil/dyadic_float.h (+3-3)
  • (modified) libc/src/__support/FPUtil/except_value_utils.h (+2-2)
  • (modified) libc/src/__support/FPUtil/fpbits_str.h (+2-2)
  • (modified) libc/src/__support/FPUtil/generic/FMA.h (+2-2)
  • (modified) libc/src/__support/FPUtil/generic/FMod.h (+2-2)
  • (modified) libc/src/__support/FPUtil/generic/README.md (+3-3)
  • (modified) libc/src/__support/FPUtil/generic/sqrt.h (+2-2)
  • (modified) libc/src/__support/FPUtil/generic/sqrt_80_bit_long_double.h (+2-2)
  • (modified) libc/src/__support/FPUtil/gpu/FMA.h (+2-2)
  • (modified) libc/src/__support/FPUtil/multiply_add.h (+4-4)
  • (modified) libc/src/__support/FPUtil/nearest_integer.h (+2-2)
  • (modified) libc/src/__support/FPUtil/riscv32/FEnvImpl.h (+2-2)
  • (modified) libc/src/__support/FPUtil/riscv64/FEnvImpl.h (+2-2)
  • (modified) libc/src/__support/FPUtil/riscv64/FMA.h (+2-2)
  • (modified) libc/src/__support/FPUtil/riscv64/sqrt.h (+2-2)
  • (modified) libc/src/__support/FPUtil/rounding_mode.h (+2-2)
  • (modified) libc/src/__support/FPUtil/triple_double.h (+2-2)
  • (modified) libc/src/__support/FPUtil/x86_64/FEnvImpl.h (+2-2)
  • (modified) libc/src/__support/FPUtil/x86_64/FMA.h (+2-2)
  • (modified) libc/src/__support/FPUtil/x86_64/LongDoubleBits.h (+2-2)
  • (modified) libc/src/__support/FPUtil/x86_64/NextAfterLongDouble.h (+2-2)
  • (modified) libc/src/__support/FPUtil/x86_64/PolyEval.h (+2-2)
  • (modified) libc/src/__support/FPUtil/x86_64/nearest_integer.h (+2-2)
  • (modified) libc/src/__support/FPUtil/x86_64/sqrt.h (+2-2)
  • (modified) libc/src/__support/File/dir.cpp (+6-6)
  • (modified) libc/src/__support/File/dir.h (+2-2)
  • (modified) libc/src/__support/File/file.cpp (+2-2)
  • (modified) libc/src/__support/File/file.h (+2-2)
  • (modified) libc/src/__support/File/linux/dir.cpp (+9-9)
  • (modified) libc/src/__support/File/linux/file.cpp (+10-8)
  • (modified) libc/src/__support/File/linux/file.h (+2-2)
  • (modified) libc/src/__support/File/linux/lseekImpl.h (+4-4)
  • (modified) libc/src/__support/File/linux/stderr.cpp (+3-3)
  • (modified) libc/src/__support/File/linux/stdin.cpp (+3-3)
  • (modified) libc/src/__support/File/linux/stdout.cpp (+3-3)
  • (modified) libc/src/__support/GPU/amdgpu/utils.h (+2-2)
  • (modified) libc/src/__support/GPU/generic/utils.h (+2-2)
  • (modified) libc/src/__support/GPU/nvptx/utils.h (+2-2)
  • (modified) libc/src/__support/GPU/utils.h (+2-2)
  • (modified) libc/src/__support/OSUtil/darwin/arm/syscall.h (+2-2)
  • (modified) libc/src/__support/OSUtil/darwin/io.h (+4-4)
  • (modified) libc/src/__support/OSUtil/darwin/quick_exit.h (+3-3)
  • (modified) libc/src/__support/OSUtil/darwin/syscall.h (+2-2)
  • (modified) libc/src/__support/OSUtil/fuchsia/io.h (+2-2)
  • (modified) libc/src/__support/OSUtil/gpu/io.cpp (+2-2)
  • (modified) libc/src/__support/OSUtil/gpu/io.h (+2-2)
  • (modified) libc/src/__support/OSUtil/gpu/quick_exit.cpp (+2-2)
  • (modified) libc/src/__support/OSUtil/gpu/quick_exit.h (+2-2)
  • (modified) libc/src/__support/OSUtil/linux/aarch64/syscall.h (+2-2)
  • (modified) libc/src/__support/OSUtil/linux/arm/syscall.h (+2-2)
  • (modified) libc/src/__support/OSUtil/linux/io.h (+4-4)
  • (modified) libc/src/__support/OSUtil/linux/quick_exit.h (+4-4)
  • (modified) libc/src/__support/OSUtil/linux/riscv64/syscall.h (+2-2)
  • (modified) libc/src/__support/OSUtil/linux/syscall.h (+2-2)
  • (modified) libc/src/__support/OSUtil/linux/x86_64/syscall.h (+2-2)
  • (modified) libc/src/__support/RPC/rpc.h (+2-2)
  • (modified) libc/src/__support/RPC/rpc_client.cpp (+3-3)
  • (modified) libc/src/__support/RPC/rpc_client.h (+2-2)
  • (modified) libc/src/__support/RPC/rpc_util.h (+2-2)
  • (modified) libc/src/__support/StringUtil/error_to_string.cpp (+2-2)
  • (modified) libc/src/__support/StringUtil/error_to_string.h (+2-2)
  • (modified) libc/src/__support/StringUtil/message_mapper.h (+2-2)
  • (modified) libc/src/__support/StringUtil/signal_to_string.cpp (+2-2)
  • (modified) libc/src/__support/StringUtil/signal_to_string.h (+2-2)
  • (modified) libc/src/__support/StringUtil/tables/linux_extension_errors.h (+2-2)
  • (modified) libc/src/__support/StringUtil/tables/linux_extension_signals.h (+2-2)
  • (modified) libc/src/__support/StringUtil/tables/linux_platform_errors.h (+2-2)
  • (modified) libc/src/__support/StringUtil/tables/linux_platform_signals.h (+2-2)
  • (modified) libc/src/__support/StringUtil/tables/minimal_platform_errors.h (+2-2)
  • (modified) libc/src/__support/StringUtil/tables/minimal_platform_signals.h (+2-2)
  • (modified) libc/src/__support/StringUtil/tables/posix_errors.h (+2-2)
  • (modified) libc/src/__support/StringUtil/tables/posix_signals.h (+2-2)
  • (modified) libc/src/__support/StringUtil/tables/signal_table.h (+2-2)
  • (modified) libc/src/__support/StringUtil/tables/stdc_errors.h (+2-2)
  • (modified) libc/src/__support/StringUtil/tables/stdc_signals.h (+2-2)
  • (modified) libc/src/__support/UInt.h (+2-2)
  • (modified) libc/src/__support/UInt128.h (+2-2)
  • (modified) libc/src/__support/arg_list.h (+2-2)
  • (modified) libc/src/__support/blockstore.h (+2-2)
  • (modified) libc/src/__support/builtin_wrappers.h (+2-2)
  • (modified) libc/src/__support/c_string.h (+2-2)
  • (modified) libc/src/__support/char_vector.h (+2-2)
  • (modified) libc/src/__support/common.h (+5-5)
  • (modified) libc/src/__support/ctype_utils.h (+2-2)
  • (modified) libc/src/__support/detailed_powers_of_ten.h (+2-2)
  • (modified) libc/src/__support/endian.h (+2-2)
  • (modified) libc/src/__support/error_or.h (+2-2)
  • (modified) libc/src/__support/fixedvector.h (+2-2)
  • (modified) libc/src/__support/float_to_string.h (+2-2)
  • (modified) libc/src/__support/high_precision_decimal.h (+2-2)
  • (modified) libc/src/__support/integer_operations.h (+2-2)
  • (modified) libc/src/__support/integer_to_string.h (+2-2)
  • (modified) libc/src/__support/integer_utils.h (+2-2)
  • (modified) libc/src/__support/libc_assert.h (+8-8)
  • (modified) libc/src/__support/macros/optimization.h (+5-4)
  • (modified) libc/src/__support/number_pair.h (+2-2)
  • (modified) libc/src/__support/str_to_float.h (+2-2)
  • (modified) libc/src/__support/str_to_integer.h (+2-2)
  • (modified) libc/src/__support/str_to_num_result.h (+2-2)
  • (modified) libc/src/__support/threads/callonce.h (+2-2)
  • (modified) libc/src/__support/threads/fork_callbacks.cpp (+2-2)
  • (modified) libc/src/__support/threads/fork_callbacks.h (+2-2)
  • (modified) libc/src/__support/threads/gpu/mutex.h (+2-2)
  • (modified) libc/src/__support/threads/linux/callonce.cpp (+7-7)
  • (modified) libc/src/__support/threads/linux/futex_word.h (+2-2)
  • (modified) libc/src/__support/threads/linux/mutex.h (+6-6)
  • (modified) libc/src/__support/threads/linux/thread.cpp (+31-29)
  • (modified) libc/src/__support/threads/mutex.h (+2-2)
  • (modified) libc/src/__support/threads/mutex_common.h (+2-2)
  • (modified) libc/src/__support/threads/thread.cpp (+2-2)
  • (modified) libc/src/__support/threads/thread.h (+2-2)
  • (modified) libc/src/__support/wctype_utils.h (+2-2)
  • (modified) libc/src/assert/__assert_fail.h (+2-2)
  • (modified) libc/src/assert/assert.h (+2-2)
  • (modified) libc/src/assert/generic/__assert_fail.cpp (+4-4)
  • (modified) libc/src/assert/gpu/__assert_fail.cpp (+4-4)
  • (modified) libc/src/ctype/isalnum.cpp (+2-2)
  • (modified) libc/src/ctype/isalnum.h (+2-2)
  • (modified) libc/src/ctype/isalpha.cpp (+2-2)
  • (modified) libc/src/ctype/isalpha.h (+2-2)
  • (modified) libc/src/ctype/isascii.cpp (+2-2)
  • (modified) libc/src/ctype/isascii.h (+2-2)
  • (modified) libc/src/ctype/isblank.cpp (+2-2)
  • (modified) libc/src/ctype/isblank.h (+2-2)
  • (modified) libc/src/ctype/iscntrl.cpp (+2-2)
  • (modified) libc/src/ctype/iscntrl.h (+2-2)
  • (modified) libc/src/ctype/isdigit.cpp (+2-2)
  • (modified) libc/src/ctype/isdigit.h (+2-2)
  • (modified) libc/src/ctype/isgraph.cpp (+2-2)
  • (modified) libc/src/ctype/isgraph.h (+2-2)
  • (modified) libc/src/ctype/islower.cpp (+2-2)
  • (modified) libc/src/ctype/islower.h (+2-2)
  • (modified) libc/src/ctype/isprint.cpp (+2-2)
  • (modified) libc/src/ctype/isprint.h (+2-2)
  • (modified) libc/src/ctype/ispunct.cpp (+2-2)
  • (modified) libc/src/ctype/ispunct.h (+2-2)
  • (modified) libc/src/ctype/isspace.cpp (+2-2)
  • (modified) libc/src/ctype/isspace.h (+2-2)
  • (modified) libc/src/ctype/isupper.cpp (+2-2)
  • (modified) libc/src/ctype/isupper.h (+2-2)
  • (modified) libc/src/ctype/isxdigit.cpp (+2-2)
  • (modified) libc/src/ctype/isxdigit.h (+2-2)
  • (modified) libc/src/ctype/toascii.cpp (+2-2)
  • (modified) libc/src/ctype/toascii.h (+2-2)
  • (modified) libc/src/ctype/tolower.cpp (+2-2)
  • (modified) libc/src/ctype/tolower.h (+2-2)
  • (modified) libc/src/ctype/toupper.cpp (+2-2)
  • (modified) libc/src/ctype/toupper.h (+2-2)
  • (modified) libc/src/dirent/closedir.cpp (+3-3)
  • (modified) libc/src/dirent/closedir.h (+2-2)
  • (modified) libc/src/dirent/dirfd.cpp (+3-3)
  • (modified) libc/src/dirent/dirfd.h (+2-2)
  • (modified) libc/src/dirent/opendir.cpp (+2-2)
  • (modified) libc/src/dirent/opendir.h (+2-2)
  • (modified) libc/src/dirent/readdir.cpp (+3-3)
  • (modified) libc/src/dirent/readdir.h (+2-2)
  • (modified) libc/src/errno/libc_errno.cpp (+2-2)
  • (modified) libc/src/errno/libc_errno.h (+6-6)
  • (modified) libc/src/fcntl/creat.h (+2-2)
  • (modified) libc/src/fcntl/linux/creat.cpp (+4-4)
  • (modified) libc/src/fcntl/linux/open.cpp (+5-5)
  • (modified) libc/src/fcntl/linux/openat.cpp (+4-4)
  • (modified) libc/src/fcntl/open.h (+2-2)
  • (modified) libc/src/fcntl/openat.h (+2-2)
  • (modified) libc/src/fenv/feclearexcept.cpp (+2-2)
  • (modified) libc/src/fenv/feclearexcept.h (+2-2)
  • (modified) libc/src/fenv/fedisableexcept.cpp (+2-2)
  • (modified) libc/src/fenv/fedisableexcept.h (+2-2)
  • (modified) libc/src/fenv/feenableexcept.cpp (+2-2)
  • (modified) libc/src/fenv/feenableexcept.h (+2-2)
  • (modified) libc/src/fenv/fegetenv.cpp (+2-2)
  • (modified) libc/src/fenv/fegetenv.h (+2-2)
  • (modified) libc/src/fenv/fegetexcept.cpp (+2-2)
  • (modified) libc/src/fenv/fegetexcept.h (+2-2)
  • (modified) libc/src/fenv/fegetexceptflag.cpp (+2-2)
  • (modified) libc/src/fenv/fegetexceptflag.h (+2-2)
  • (modified) libc/src/fenv/fegetround.cpp (+2-2)
  • (modified) libc/src/fenv/fegetround.h (+2-2)
  • (modified) libc/src/fenv/feholdexcept.cpp (+2-2)
  • (modified) libc/src/fenv/feholdexcept.h (+2-2)
  • (modified) libc/src/fenv/feraiseexcept.cpp (+2-2)
  • (modified) libc/src/fenv/feraiseexcept.h (+2-2)
  • (modified) libc/src/fenv/fesetenv.cpp (+2-2)
  • (modified) libc/src/fenv/fesetenv.h (+2-2)
  • (modified) libc/src/fenv/fesetexceptflag.cpp (+2-2)
  • (modified) libc/src/fenv/fesetexceptflag.h (+2-2)
  • (modified) libc/src/fenv/fesetround.cpp (+2-2)
  • (modified) libc/src/fenv/fesetround.h (+2-2)
  • (modified) libc/src/fenv/fetestexcept.cpp (+2-2)
  • (modified) libc/src/fenv/fetestexcept.h (+2-2)
  • (modified) libc/src/fenv/feupdateenv.cpp (+2-2)
  • (modified) libc/src/fenv/feupdateenv.h (+2-2)
  • (modified) libc/src/gpu/rpc_host_call.cpp (+2-2)
  • (modified) libc/src/gpu/rpc_host_call.h (+2-2)
  • (modified) libc/src/gpu/rpc_reset.cpp (+3-3)
  • (modified) libc/src/gpu/rpc_reset.h (+2-2)
  • (modified) libc/src/inttypes/imaxabs.cpp (+2-2)
  • (modified) libc/src/inttypes/imaxabs.h (+2-2)
  • (modified) libc/src/inttypes/imaxdiv.cpp (+2-2)
  • (modified) libc/src/inttypes/imaxdiv.h (+2-2)
  • (modified) libc/src/inttypes/strtoimax.cpp (+2-2)
  • (modified) libc/src/inttypes/strtoimax.h (+2-2)
  • (modified) libc/src/inttypes/strtoumax.cpp (+2-2)
  • (modified) libc/src/inttypes/strtoumax.h (+2-2)
  • (modified) libc/src/math/aarch64/ceil.cpp (+2-2)
  • (modified) libc/src/math/aarch64/ceilf.cpp (+2-2)
  • (modified) libc/src/math/aarch64/floor.cpp (+2-2)
  • (modified) libc/src/math/aarch64/floorf.cpp (+2-2)
  • (modified) libc/src/math/aarch64/round.cpp (+2-2)
  • (modified) libc/src/math/aarch64/roundf.cpp (+2-2)
  • (modified) libc/src/math/aarch64/trunc.cpp (+2-2)
  • (modified) libc/src/math/aarch64/truncf.cpp (+2-2)
  • (modified) libc/src/math/acosf.h (+2-2)
  • (modified) libc/src/math/acoshf.h (+2-2)
  • (modified) libc/src/math/asinf.h (+2-2)
  • (modified) libc/src/math/asinhf.h (+2-2)
  • (modified) libc/src/math/atanf.h (+2-2)
  • (modified) libc/src/math/atanhf.h (+2-2)
  • (modified) libc/src/math/ceil.h (+2-2)
  • (modified) libc/src/math/ceilf.h (+2-2)
  • (modified) libc/src/math/ceill.h (+2-2)
  • (modified) libc/src/math/copysign.h (+2-2)
  • (modified) libc/src/math/copysignf.h (+2-2)
  • (modified) libc/src/math/copysignl.h (+2-2)
  • (modified) libc/src/math/cos.h (+2-2)
  • (modified) libc/src/math/cosf.h (+2-2)
  • (modified) libc/src/math/cosh.h (+2-2)
  • (modified) libc/src/math/coshf.h (+2-2)
  • (modified) libc/src/math/docs/add_math_function.md (+3-3)
  • (modified) libc/src/math/erff.h (+2-2)
  • (modified) libc/src/math/exp.h (+2-2)
  • (modified) libc/src/math/exp10.h (+2-2)
  • (modified) libc/src/math/exp10f.h (+2-2)
  • (modified) libc/src/math/exp2.h (+2-2)
  • (modified) libc/src/math/exp2f.h (+2-2)
  • (modified) libc/src/math/expf.h (+2-2)
diff --git a/libc/benchmarks/CMakeLists.txt b/libc/benchmarks/CMakeLists.txt
index 48f5f48ff832248..4978da65850ccba 100644
--- a/libc/benchmarks/CMakeLists.txt
+++ b/libc/benchmarks/CMakeLists.txt
@@ -162,7 +162,7 @@ function(add_libc_multi_impl_benchmark name)
         get_target_property(entrypoint_object_file ${fq_config_name} "OBJECT_FILE_RAW")
         target_link_libraries(${benchmark_name} PUBLIC json ${entrypoint_object_file})
         string(TOUPPER ${name} name_upper)
-        target_compile_definitions(${benchmark_name} PRIVATE "-DLIBC_BENCHMARK_FUNCTION_${name_upper}=__llvm_libc::${name}" "-DLIBC_BENCHMARK_FUNCTION_NAME=\"${fq_config_name}\"")
+        target_compile_definitions(${benchmark_name} PRIVATE "-DLIBC_BENCHMARK_FUNCTION_${name_upper}=LIBC_NAMESPACE::${name}" "-DLIBC_BENCHMARK_FUNCTION_NAME=\"${fq_config_name}\"")
         llvm_update_compile_flags(${benchmark_name})
     else()
       message(STATUS "Skipping benchmark for '${fq_config_name}' insufficient host cpu features '${required_cpu_features}'")
diff --git a/libc/benchmarks/LibcDefaultImplementations.cpp b/libc/benchmarks/LibcDefaultImplementations.cpp
index 95077cd6591530e..c50ae00ffa105ea 100644
--- a/libc/benchmarks/LibcDefaultImplementations.cpp
+++ b/libc/benchmarks/LibcDefaultImplementations.cpp
@@ -2,7 +2,7 @@
 #include "llvm/ADT/ArrayRef.h"
 #include <cstddef>
 
-namespace __llvm_libc {
+namespace LIBC_NAMESPACE {
 
 extern void *memcpy(void *__restrict, const void *__restrict, size_t);
 extern void *memmove(void *, const void *, size_t);
@@ -11,7 +11,7 @@ extern void bzero(void *, size_t);
 extern int memcmp(const void *, const void *, size_t);
 extern int bcmp(const void *, const void *, size_t);
 
-} // namespace __llvm_libc
+} // namespace LIBC_NAMESPACE
 
 // List of implementations to test.
 
@@ -23,31 +23,31 @@ using llvm::libc_benchmarks::MemsetConfiguration;
 
 llvm::ArrayRef<MemcpyConfiguration> getMemcpyConfigurations() {
   static constexpr MemcpyConfiguration kMemcpyConfigurations[] = {
-      {__llvm_libc::memcpy, "__llvm_libc::memcpy"}};
+      {LIBC_NAMESPACE::memcpy, "LIBC_NAMESPACE::memcpy"}};
   return llvm::ArrayRef(kMemcpyConfigurations);
 }
 llvm::ArrayRef<MemmoveConfiguration> getMemmoveConfigurations() {
   static constexpr MemmoveConfiguration kMemmoveConfigurations[] = {
-      {__llvm_libc::memmove, "__llvm_libc::memmove"}};
+      {LIBC_NAMESPACE::memmove, "LIBC_NAMESPACE::memmove"}};
   return llvm::ArrayRef(kMemmoveConfigurations);
 }
 llvm::ArrayRef<MemcmpOrBcmpConfiguration> getMemcmpConfigurations() {
   static constexpr MemcmpOrBcmpConfiguration kMemcmpConfiguration[] = {
-      {__llvm_libc::memcmp, "__llvm_libc::memcmp"}};
+      {LIBC_NAMESPACE::memcmp, "LIBC_NAMESPACE::memcmp"}};
   return llvm::ArrayRef(kMemcmpConfiguration);
 }
 llvm::ArrayRef<MemcmpOrBcmpConfiguration> getBcmpConfigurations() {
   static constexpr MemcmpOrBcmpConfiguration kBcmpConfigurations[] = {
-      {__llvm_libc::bcmp, "__llvm_libc::bcmp"}};
+      {LIBC_NAMESPACE::bcmp, "LIBC_NAMESPACE::bcmp"}};
   return llvm::ArrayRef(kBcmpConfigurations);
 }
 llvm::ArrayRef<MemsetConfiguration> getMemsetConfigurations() {
   static constexpr MemsetConfiguration kMemsetConfigurations[] = {
-      {__llvm_libc::memset, "__llvm_libc::memset"}};
+      {LIBC_NAMESPACE::memset, "LIBC_NAMESPACE::memset"}};
   return llvm::ArrayRef(kMemsetConfigurations);
 }
 llvm::ArrayRef<BzeroConfiguration> getBzeroConfigurations() {
   static constexpr BzeroConfiguration kBzeroConfigurations[] = {
-      {__llvm_libc::bzero, "__llvm_libc::bzero"}};
+      {LIBC_NAMESPACE::bzero, "LIBC_NAMESPACE::bzero"}};
   return llvm::ArrayRef(kBzeroConfigurations);
 }
diff --git a/libc/benchmarks/LibcMemoryBenchmark.h b/libc/benchmarks/LibcMemoryBenchmark.h
index f00bed4f6931176..5ba8b936a0cafa6 100644
--- a/libc/benchmarks/LibcMemoryBenchmark.h
+++ b/libc/benchmarks/LibcMemoryBenchmark.h
@@ -32,7 +32,7 @@ namespace libc_benchmarks {
 struct StudyConfiguration {
   // One of 'memcpy', 'memset', 'memcmp'.
   // The underlying implementation is always the llvm libc one.
-  // e.g. 'memcpy' will test '__llvm_libc::memcpy'
+  // e.g. 'memcpy' will test 'LIBC_NAMESPACE::memcpy'
   std::string Function;
 
   // The number of trials to run for this benchmark.
diff --git a/libc/benchmarks/LibcMemoryBenchmarkMain.cpp b/libc/benchmarks/LibcMemoryBenchmarkMain.cpp
index 4fc6777cec45d00..acd7c30717597a1 100644
--- a/libc/benchmarks/LibcMemoryBenchmarkMain.cpp
+++ b/libc/benchmarks/LibcMemoryBenchmarkMain.cpp
@@ -21,7 +21,7 @@
 #include <cstring>
 #include <unistd.h>
 
-namespace __llvm_libc {
+namespace LIBC_NAMESPACE {
 
 extern void *memcpy(void *__restrict, const void *__restrict, size_t);
 extern void *memmove(void *, const void *, size_t);
@@ -30,7 +30,7 @@ extern void bzero(void *, size_t);
 extern int memcmp(const void *, const void *, size_t);
 extern int bcmp(const void *, const void *, size_t);
 
-} // namespace __llvm_libc
+} // namespace LIBC_NAMESPACE
 
 namespace llvm {
 namespace libc_benchmarks {
diff --git a/libc/benchmarks/automemcpy/lib/CodeGen.cpp b/libc/benchmarks/automemcpy/lib/CodeGen.cpp
index f4060099bddd77c..3837bd97d9f9a70 100644
--- a/libc/benchmarks/automemcpy/lib/CodeGen.cpp
+++ b/libc/benchmarks/automemcpy/lib/CodeGen.cpp
@@ -62,7 +62,7 @@ namespace functions {
 // static void memcpy_0xB20D4702493C397E(char *__restrict dst,
 //                                       const char *__restrict src,
 //                                       size_t size) {
-//   using namespace __llvm_libc::x86;
+//   using namespace LIBC_NAMESPACE::x86;
 //   if(size == 0) return;
 //   if(size == 1) return copy<_1>(dst, src);
 //   if(size < 4) return copy<HeadTail<_2>>(dst, src, size);
@@ -249,7 +249,7 @@ static raw_ostream &operator<<(raw_ostream &Stream,
   const auto &Ctx = FI.Ctx;
   Stream << "static " << Ctx.FunctionReturnType << ' ' << FI.Name
          << Ctx.FunctionArgs << " {\n";
-  Stream << kIndent << "using namespace __llvm_libc::" << FI.ElementClass
+  Stream << kIndent << "using namespace LIBC_NAMESPACE::" << FI.ElementClass
          << ";\n";
   for (const auto &I : FI.Individuals)
     if (I.Element.Size == 0)
@@ -428,7 +428,7 @@ namespace configurations {
 // ------------------------------------------------------------
 // e.g.
 // llvm::ArrayRef<MemcpyConfiguration> getMemcpyConfigurations() {
-//   using namespace __llvm_libc;
+//   using namespace LIBC_NAMESPACE;
 //   static constexpr MemcpyConfiguration kConfigurations[] = {
 //     {Wrap<memcpy_0xE00E29EE73994E2B>, "memcpy_0xE00E29EE73994E2B"},
 //     {Wrap<memcpy_0x8661D80472487AB5>, "memcpy_0x8661D80472487AB5"},
@@ -504,7 +504,7 @@ static raw_ostream &operator<<(raw_ostream &Stream, const Configuration &C) {
   if (C.Descriptors.empty())
     Stream << kIndent << "return {};\n";
   else {
-    Stream << kIndent << "using namespace __llvm_libc;\n";
+    Stream << kIndent << "using namespace LIBC_NAMESPACE;\n";
     Stream << kIndent << "static constexpr " << C.Type
            << " kConfigurations[] = {\n";
     Stream << C.Descriptors;
@@ -542,11 +542,11 @@ static void Serialize(raw_ostream &Stream,
   Stream << "using llvm::libc_benchmarks::MemmoveConfiguration;\n";
   Stream << "using llvm::libc_benchmarks::MemsetConfiguration;\n";
   Stream << "\n";
-  Stream << "namespace __llvm_libc {\n";
+  Stream << "namespace LIBC_NAMESPACE {\n";
   Stream << "\n";
   codegen::functions::Serialize(Stream, Descriptors);
   Stream << "\n";
-  Stream << "} // namespace __llvm_libc\n";
+  Stream << "} // namespace LIBC_NAMESPACE\n";
   Stream << "\n";
   Stream << "namespace llvm {\n";
   Stream << "namespace automemcpy {\n";
diff --git a/libc/benchmarks/automemcpy/unittests/CodeGenTest.cpp b/libc/benchmarks/automemcpy/unittests/CodeGenTest.cpp
index b0c5f3a05734de1..5084b1d67dcd5e3 100644
--- a/libc/benchmarks/automemcpy/unittests/CodeGenTest.cpp
+++ b/libc/benchmarks/automemcpy/unittests/CodeGenTest.cpp
@@ -63,14 +63,14 @@ using llvm::libc_benchmarks::MemcpyConfiguration;
 using llvm::libc_benchmarks::MemmoveConfiguration;
 using llvm::libc_benchmarks::MemsetConfiguration;
 
-namespace __llvm_libc {
+namespace LIBC_NAMESPACE {
 
 static void memcpy_0xE00E29EE73994E2B(char *__restrict dst, const char *__restrict src, size_t size) {
-  using namespace __llvm_libc::x86;
+  using namespace LIBC_NAMESPACE::x86;
   return copy<Accelerator>(dst, src, size);
 }
 static void memcpy_0x7381B60C7BE75EF9(char *__restrict dst, const char *__restrict src, size_t size) {
-  using namespace __llvm_libc::x86;
+  using namespace LIBC_NAMESPACE::x86;
   if(size == 0) return;
   if(size == 1) return copy<_1>(dst, src);
   if(size == 2) return copy<_2>(dst, src);
@@ -84,7 +84,7 @@ static void memcpy_0x7381B60C7BE75EF9(char *__restrict dst, const char *__restri
   return copy<Loop<_64>>(dst, src, size);
 }
 static int memcmp_0x348D7BA6DB0EE033(const char * lhs, const char * rhs, size_t size) {
-  using namespace __llvm_libc::x86;
+  using namespace LIBC_NAMESPACE::x86;
   if(size == 0) return 0;
   if(size == 1) return three_way_compare<_1>(lhs, rhs);
   if(size < 4) return three_way_compare<HeadTail<_2>>(lhs, rhs, size);
@@ -95,7 +95,7 @@ static int memcmp_0x348D7BA6DB0EE033(const char * lhs, const char * rhs, size_t
   return three_way_compare<Align<_16,Arg::Lhs>::Then<Loop<_16>>>(lhs, rhs, size);
 }
 static void memset_0x71E761699B999863(char * dst, int value, size_t size) {
-  using namespace __llvm_libc::x86;
+  using namespace LIBC_NAMESPACE::x86;
   if(size == 0) return;
   if(size == 1) return splat_set<_1>(dst, value);
   if(size < 4) return splat_set<HeadTail<_2>>(dst, value, size);
@@ -108,7 +108,7 @@ static void memset_0x71E761699B999863(char * dst, int value, size_t size) {
   return splat_set<Align<_16,Arg::Dst>::Then<Loop<_32>>>(dst, value, size);
 }
 static void memset_0x3DF0F44E2ED6A50F(char * dst, int value, size_t size) {
-  using namespace __llvm_libc::x86;
+  using namespace LIBC_NAMESPACE::x86;
   if(size == 0) return;
   if(size == 1) return splat_set<_1>(dst, value);
   if(size < 4) return splat_set<HeadTail<_2>>(dst, value, size);
@@ -121,7 +121,7 @@ static void memset_0x3DF0F44E2ED6A50F(char * dst, int value, size_t size) {
   return splat_set<Align<_32,Arg::Dst>::Then<Loop<_32>>>(dst, value, size);
 }
 static void bzero_0x475977492C218AD4(char * dst, size_t size) {
-  using namespace __llvm_libc::x86;
+  using namespace LIBC_NAMESPACE::x86;
   if(size == 0) return;
   if(size == 1) return splat_set<_1>(dst, 0);
   if(size == 2) return splat_set<_2>(dst, 0);
@@ -134,7 +134,7 @@ static void bzero_0x475977492C218AD4(char * dst, size_t size) {
   return splat_set<Align<_32,Arg::Dst>::Then<Loop<_32>>>(dst, 0, size);
 }
 
-} // namespace __llvm_libc
+} // namespace LIBC_NAMESPACE
 
 namespace llvm {
 namespace automemcpy {
@@ -163,7 +163,7 @@ void *Wrap(void *__restrict dst, const void *__restrict src, size_t size) {
   return dst;
 }
 llvm::ArrayRef<MemcpyConfiguration> getMemcpyConfigurations() {
-  using namespace __llvm_libc;
+  using namespace LIBC_NAMESPACE;
   static constexpr MemcpyConfiguration kConfigurations[] = {
     {Wrap<memcpy_0xE00E29EE73994E2B>, "memcpy_0xE00E29EE73994E2B"},
     {Wrap<memcpy_0x7381B60C7BE75EF9>, "memcpy_0x7381B60C7BE75EF9"},
@@ -178,7 +178,7 @@ int Wrap(const void *lhs, const void *rhs, size_t size) {
              reinterpret_cast<const char *>(rhs), size);
 }
 llvm::ArrayRef<MemcmpOrBcmpConfiguration> getMemcmpConfigurations() {
-  using namespace __llvm_libc;
+  using namespace LIBC_NAMESPACE;
   static constexpr MemcmpOrBcmpConfiguration kConfigurations[] = {
     {Wrap<memcmp_0x348D7BA6DB0EE033>, "memcmp_0x348D7BA6DB0EE033"},
   };
@@ -194,7 +194,7 @@ template <MemsetStub Foo> void *Wrap(void *dst, int value, size_t size) {
   return dst;
 }
 llvm::ArrayRef<MemsetConfiguration> getMemsetConfigurations() {
-  using namespace __llvm_libc;
+  using namespace LIBC_NAMESPACE;
   static constexpr MemsetConfiguration kConfigurations[] = {
     {Wrap<memset_0x71E761699B999863>, "memset_0x71E761699B999863"},
     {Wrap<memset_0x3DF0F44E2ED6A50F>, "memset_0x3DF0F44E2ED6A50F"},
@@ -207,7 +207,7 @@ template <BzeroStub Foo> void Wrap(void *dst, size_t size) {
   Foo(reinterpret_cast<char *>(dst), size);
 }
 llvm::ArrayRef<BzeroConfiguration> getBzeroConfigurations() {
-  using namespace __llvm_libc;
+  using namespace LIBC_NAMESPACE;
   static constexpr BzeroConfiguration kConfigurations[] = {
     {Wrap<bzero_0x475977492C218AD4>, "bzero_0x475977492C218AD4"},
   };
diff --git a/libc/config/linux/app.h b/libc/config/linux/app.h
index 40a45078f6c8f35..5521991e3e1c36d 100644
--- a/libc/config/linux/app.h
+++ b/libc/config/linux/app.h
@@ -13,7 +13,7 @@
 
 #include <stdint.h>
 
-namespace __llvm_libc {
+namespace LIBC_NAMESPACE {
 
 // Data structure to capture properties of the linux/ELF TLS image.
 struct TLSImage {
@@ -106,6 +106,6 @@ void init_tls(TLSDescriptor &tls);
 // Cleanup the TLS area as described in |tls_descriptor|.
 void cleanup_tls(uintptr_t tls_addr, uintptr_t tls_size);
 
-} // namespace __llvm_libc
+} // namespace LIBC_NAMESPACE
 
 #endif // LLVM_LIBC_CONFIG_LINUX_APP_H
diff --git a/libc/docs/dev/clang_tidy_checks.rst b/libc/docs/dev/clang_tidy_checks.rst
index e635f84a5a1a462..18c011e67b4b916 100644
--- a/libc/docs/dev/clang_tidy_checks.rst
+++ b/libc/docs/dev/clang_tidy_checks.rst
@@ -30,19 +30,19 @@ implementation-in-namespace
 ---------------------------
 
 It is part of our implementation standards that all implementation pieces live
-under the ``__llvm_libc`` namespace. This prevents pollution of the global
+under the ``LIBC_NAMESPACE`` namespace. This prevents pollution of the global
 namespace. Without a formal check to ensure this, an implementation might
 compile and pass unit tests, but not produce a usable libc function.
 
 This check that ensures any function call resolves to a function within the
-``__llvm_libc`` namespace.
+``LIBC_NAMESPACE`` namespace.
 
 .. code-block:: c++
 
     // Correct: implementation inside the correct namespace.
-    namespace __llvm_libc {
+    namespace LIBC_NAMESPACE {
         void LLVM_LIBC_ENTRYPOINT(strcpy)(char *dest, const char *src) {}
-        // Namespaces within __llvm_libc namespace are allowed.
+        // Namespaces within LIBC_NAMESPACE namespace are allowed.
         namespace inner{
             int localVar = 0;
         }
@@ -67,7 +67,7 @@ creates some uncertainty about which library a call resolves to especially when
 a public header with non-namespaced functions like ``string.h`` is included.
 
 This check ensures any function call resolves to a function within the
-__llvm_libc namespace.
+LIBC_NAMESPACE namespace.
 
 There are exceptions for the following functions: 
 ``__errno_location`` so that ``errno`` can be set;
@@ -76,10 +76,10 @@ are always external and can be intercepted.
 
 .. code-block:: c++
 
-    namespace __llvm_libc {
+    namespace LIBC_NAMESPACE {
 
     // Allow calls with the fully qualified name.
-    __llvm_libc::strlen("hello");
+    LIBC_NAMESPACE::strlen("hello");
 
     // Allow calls to compiler provided functions.
     (void)__builtin_abs(-1);
@@ -93,4 +93,4 @@ are always external and can be intercepted.
     // Allow calling into specific global functions (explained above)
     ::malloc(10);
 
-    } // namespace __llvm_libc
+    } // namespace LIBC_NAMESPACE
diff --git a/libc/docs/dev/code_style.rst b/libc/docs/dev/code_style.rst
index 4b03217b18c33fa..a28f7b9d717d4d0 100644
--- a/libc/docs/dev/code_style.rst
+++ b/libc/docs/dev/code_style.rst
@@ -158,7 +158,7 @@ this:
 
    ...
 
-     __llvm_libc::AllocChecker ac;
+     LIBC_NAMESPACE::AllocChecker ac;
      auto *obj = new (ac) Type(...);
      if (!ac) {
        // handle allocator failure.
diff --git a/libc/docs/dev/implementation_standard.rst b/libc/docs/dev/implementation_standard.rst
index 0fdbb7c3c3d74d8..389981a42f76c16 100644
--- a/libc/docs/dev/implementation_standard.rst
+++ b/libc/docs/dev/implementation_standard.rst
@@ -33,17 +33,17 @@ example. The ``round`` function will be declared in an internal header file
     #ifndef LLVM_LIBC_SRC_MATH_ROUND_ROUND_H
     #define LLVM_LIBC_SRC_MATH_ROUND_ROUND_H
 
-    namespace __llvm_libc {
+    namespace LIBC_NAMESPACE {
 
     double round(double);
 
-    } // namespace __llvm_libc
+    } // namespace LIBC_NAMESPACE
 
     #endif LLVM_LIBC_SRC_MATH_ROUND_ROUND_H
 
 Notice that the ``round`` function declaration is nested inside the namespace
-``__llvm_libc``. All implementation constructs in LLVM-libc are declared within
-the namespace ``__llvm_libc``.
+``LIBC_NAMESPACE``. All implementation constructs in LLVM-libc are declared within
+the namespace ``LIBC_NAMESPACE``.
 
 ``.cpp`` File Structure
 -----------------------
@@ -55,13 +55,13 @@ the entrypoint function should make use of a special macro. For example, the
 
     // --- round.cpp --- //
 
-    namespace __llvm_libc {
+    namespace LIBC_NAMESPACE {
 
     double LLVM_LIBC_ENTRYPOINT(round)(double d) {
       // ... implementation goes here.
     }
 
-    } // namespace __llvm_libc
+    } // namespace LIBC_NAMESPACE
 
 Notice the use of the macro ``LLVM_LIBC_ENTRYPOINT``. This macro helps us define
 an C alias symbol for the C++ implementation. The C alias need not be added by
diff --git a/libc/fuzzing/math/Compare.h b/libc/fuzzing/math/Compare.h
index e690e5168d27b81..2b84ad3ab462137 100644
--- a/libc/fuzzing/math/Compare.h
+++ b/libc/fuzzing/math/Compare.h
@@ -13,10 +13,11 @@
 #include "src/__support/FPUtil/FPBits.h"
 
 template <typename T>
-__llvm_libc::cpp::enable_if_t<__llvm_libc::cpp::is_floating_point_v<T>, bool>
+LIBC_NAMESPACE::cpp::enable_if_t<LIBC_NAMESPACE::cpp::is_floating_point_v<T>,
+                                 bool>
 ValuesEqual(T x1, T x2) {
-  __llvm_libc::fputil::FPBits<T> bits1(x1);
-  __llvm_libc::fputil::FPBits<T> bits2(x2);
+  LIBC_NAMESPACE::fputil::FPBits<T> bits1(x1);
+  LIBC_NAMESPACE::fputil::FPBits<T> bits2(x2);
   // If either is NaN, we want both to be NaN.
   if (bits1.is_nan() || bits2.is_nan())
     return bits2.is_nan() && bits2.is_nan();
@@ -26,7 +27,7 @@ ValuesEqual(T x1, T x2) {
 }
 
 template <typename T>
-__llvm_libc::cpp::enable_if_t<__llvm_libc::cpp::is_integral_v<T>, bool>
+LIBC_NAMESPACE::cpp::enable_if_t<LIBC_NAMESPACE::cpp::is_integral_v<T>, bool>
 ValuesEqual(T x1, T x2) {
   return x1 == x2;
 }
diff --git a/libc/fuzzing/math/RemQuoDiff.h b/libc/fuzzing/math/RemQuoDiff.h
index b934bc885876991..2a9622496176737 100644
--- a/libc/fuzzing/math/RemQuoDiff.h
+++ b/libc/fuzzing/math/RemQuoDiff.h
@@ -44,8 +44,8 @@ void RemQuoDiff(RemQuoFunc<T> func1, RemQuoFunc<T> func2, const uint8_t *data,
   if ((q1 & 0x7) != (q2 & 0x7))
     __builtin_trap();
 
-  __llvm_libc::fputil::FPBits<T> bits1(remainder1);
-  __llvm_libc::fputil::FPBits<T> bits2(remainder2);
+  LIBC_NAMESPACE::fputil::FPBits<T> bits1(remainder1);
+  LIBC_NAMESPACE::fputil::FPBits<T> bits2(remainder2);
   if (bits1.uintval() != bits2.uintval())
     __builtin_trap();
 }
diff --git a/libc/fuzzing/math/math_differential_fuzz.cpp b/libc/fuzzing/math/math_differential_fuzz.cpp
index f315b6a99e1e52b..0e66377cfba90d5 100644
--- a/libc/fuzzing/math/math_differential_fuzz.cpp
+++ b/libc/fuzzing/math/math_differential_fuzz.cpp
@@ -70,83 +70,89 @@
 
 extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
 
-  SingleInputSingleOutputDiff<float>(&__llvm_libc::ceilf, &::ceilf, data, size);
-  SingleInputSingleOutputDiff<double>(&__llvm_libc::ceil, &::ceil, data, size);
-  SingleInputSingleOutputDiff<long double>(&__llvm_libc::ceill, &::ceill, data,
-                                           size);
+  SingleInputSingleOutputDiff<float>(&LIBC_NAMESPACE::ceilf, &::ceilf, data,
+                                     size);
+  SingleInputSingleOutputDiff<double>(&LIBC_NAMESPACE::ceil, &::ceil, data,
+                                      size);
+  SingleInputSingleOutputDiff<long double>(&LIBC_NAMESPACE::ceill, &::ceill,
+                                           data, size);
 
-  SingleInputSingleOutputDiff<float>(&__llvm_libc::floorf, &::floorf, data,
+  SingleInputSingleOutputDiff<float>(&LIBC_NAMESPACE::floorf, &::floorf, data,
                                      size);
-  SingleInputSingleOutputDiff<double>(&__llvm_libc::floor, &::floor, data,
+  SingleInputSingleOutputDiff<double>(&LIBC_NAMESPACE::floor, &::floor, data,
                                 ...
[truncated]

@gchatelet gchatelet merged commit b6bc9d7 into llvm:main Sep 26, 2023
2 checks passed
@gchatelet gchatelet deleted the mass_replace_ns branch September 26, 2023 12:48
Guzhu-AMD pushed a commit to GPUOpen-Drivers/llvm-project that referenced this pull request Sep 28, 2023
Local branch amd-gfx bef2fde Merged main:b797a6aede3d into amd-gfx:a757a754c785
Remote branch main b6bc9d7 [libc] Mass replace enclosing namespace (llvm#67032)
alfredfo added a commit to alfredfo/llvm-project that referenced this pull request Oct 19, 2023
Building helloworld.c currently errors with "undefined symbol:
__llvm_libc_syscall"

See: llvm#67032
alfredfo added a commit that referenced this pull request Oct 19, 2023
Building helloworld.c currently errors with "undefined symbol:
__llvm_libc_syscall"

See: #67032
gnoliyil pushed a commit to gnoliyil/fuchsia that referenced this pull request Jan 27, 2024
…SPACE_syscall definition (#69548)

Building helloworld.c currently errors with "undefined symbol:
__llvm_libc_syscall"

See: llvm/llvm-project#67032
GitOrigin-RevId: c2baa3bec426ef9d1d5315fc000aafafb36d5628
Original-Revision: 650898aadfef32aed072dfcfa0b9372b607693d6
Roller-URL: https://ci.chromium.org/b/8766812100011141169
CQ-Do-Not-Cancel-Tryjobs: true
Change-Id: I2e9c9f48f4d23304fc78944207336d6383836794
Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/934573
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants