diff options
author | Guillaume Chatelet <gchatelet@google.com> | 2023-09-26 11:45:04 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-26 11:45:04 +0200 |
commit | b6bc9d72f65a5086f310f321e969d96e9a559e75 (patch) | |
tree | 1e9a9f8c36c9dfc0106507f7b7a0055af83c4a07 /libc/src/stdio/gpu | |
parent | 7675f541f75baa20e8ec007cd625a837e89fc01f (diff) | |
download | llvm-b6bc9d72f65a5086f310f321e969d96e9a559e75.zip llvm-b6bc9d72f65a5086f310f321e969d96e9a559e75.tar.gz llvm-b6bc9d72f65a5086f310f321e969d96e9a559e75.tar.bz2 |
[libc] Mass replace enclosing namespace (#67032)
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
Diffstat (limited to 'libc/src/stdio/gpu')
-rw-r--r-- | libc/src/stdio/gpu/clearerr.cpp | 4 | ||||
-rw-r--r-- | libc/src/stdio/gpu/fclose.cpp | 4 | ||||
-rw-r--r-- | libc/src/stdio/gpu/feof.cpp | 4 | ||||
-rw-r--r-- | libc/src/stdio/gpu/ferror.cpp | 4 | ||||
-rw-r--r-- | libc/src/stdio/gpu/fgetc.cpp | 4 | ||||
-rw-r--r-- | libc/src/stdio/gpu/fgets.cpp | 8 | ||||
-rw-r--r-- | libc/src/stdio/gpu/file.h | 4 | ||||
-rw-r--r-- | libc/src/stdio/gpu/fopen.cpp | 4 | ||||
-rw-r--r-- | libc/src/stdio/gpu/fputc.cpp | 4 | ||||
-rw-r--r-- | libc/src/stdio/gpu/fputs.cpp | 4 | ||||
-rw-r--r-- | libc/src/stdio/gpu/fread.cpp | 4 | ||||
-rw-r--r-- | libc/src/stdio/gpu/fwrite.cpp | 4 | ||||
-rw-r--r-- | libc/src/stdio/gpu/getc.cpp | 4 | ||||
-rw-r--r-- | libc/src/stdio/gpu/getchar.cpp | 4 | ||||
-rw-r--r-- | libc/src/stdio/gpu/putc.cpp | 4 | ||||
-rw-r--r-- | libc/src/stdio/gpu/putchar.cpp | 4 | ||||
-rw-r--r-- | libc/src/stdio/gpu/puts.cpp | 4 | ||||
-rw-r--r-- | libc/src/stdio/gpu/stderr.cpp | 6 | ||||
-rw-r--r-- | libc/src/stdio/gpu/stdin.cpp | 6 | ||||
-rw-r--r-- | libc/src/stdio/gpu/stdout.cpp | 6 |
20 files changed, 45 insertions, 45 deletions
diff --git a/libc/src/stdio/gpu/clearerr.cpp b/libc/src/stdio/gpu/clearerr.cpp index 01c34ca..2267fdf 100644 --- a/libc/src/stdio/gpu/clearerr.cpp +++ b/libc/src/stdio/gpu/clearerr.cpp @@ -11,7 +11,7 @@ #include <stdio.h> -namespace __llvm_libc { +namespace LIBC_NAMESPACE { LLVM_LIBC_FUNCTION(void, clearerr, (::FILE * stream)) { rpc::Client::Port port = rpc::client.open<RPC_CLEARERR>(); @@ -21,4 +21,4 @@ LLVM_LIBC_FUNCTION(void, clearerr, (::FILE * stream)) { port.close(); } -} // namespace __llvm_libc +} // namespace LIBC_NAMESPACE diff --git a/libc/src/stdio/gpu/fclose.cpp b/libc/src/stdio/gpu/fclose.cpp index a8e36bc..bdedbe5 100644 --- a/libc/src/stdio/gpu/fclose.cpp +++ b/libc/src/stdio/gpu/fclose.cpp @@ -11,7 +11,7 @@ #include <stdio.h> -namespace __llvm_libc { +namespace LIBC_NAMESPACE { LLVM_LIBC_FUNCTION(int, fclose, (::FILE * stream)) { uint64_t ret = 0; @@ -26,4 +26,4 @@ LLVM_LIBC_FUNCTION(int, fclose, (::FILE * stream)) { return static_cast<int>(ret); } -} // namespace __llvm_libc +} // namespace LIBC_NAMESPACE diff --git a/libc/src/stdio/gpu/feof.cpp b/libc/src/stdio/gpu/feof.cpp index 27d27a4..ddcef38 100644 --- a/libc/src/stdio/gpu/feof.cpp +++ b/libc/src/stdio/gpu/feof.cpp @@ -11,7 +11,7 @@ #include <stdio.h> -namespace __llvm_libc { +namespace LIBC_NAMESPACE { LLVM_LIBC_FUNCTION(int, feof, (::FILE * stream)) { int ret; @@ -23,4 +23,4 @@ LLVM_LIBC_FUNCTION(int, feof, (::FILE * stream)) { return ret; } -} // namespace __llvm_libc +} // namespace LIBC_NAMESPACE diff --git a/libc/src/stdio/gpu/ferror.cpp b/libc/src/stdio/gpu/ferror.cpp index e4bd631..9ed598f 100644 --- a/libc/src/stdio/gpu/ferror.cpp +++ b/libc/src/stdio/gpu/ferror.cpp @@ -11,7 +11,7 @@ #include <stdio.h> -namespace __llvm_libc { +namespace LIBC_NAMESPACE { LLVM_LIBC_FUNCTION(int, ferror, (::FILE * stream)) { int ret; @@ -23,4 +23,4 @@ LLVM_LIBC_FUNCTION(int, ferror, (::FILE * stream)) { return ret; } -} // namespace __llvm_libc +} // namespace LIBC_NAMESPACE diff --git a/libc/src/stdio/gpu/fgetc.cpp b/libc/src/stdio/gpu/fgetc.cpp index ff4ef27..56f42a0 100644 --- a/libc/src/stdio/gpu/fgetc.cpp +++ b/libc/src/stdio/gpu/fgetc.cpp @@ -11,7 +11,7 @@ #include <stdio.h> -namespace __llvm_libc { +namespace LIBC_NAMESPACE { LLVM_LIBC_FUNCTION(int, fgetc, (::FILE * stream)) { unsigned char c; @@ -22,4 +22,4 @@ LLVM_LIBC_FUNCTION(int, fgetc, (::FILE * stream)) { return c; } -} // namespace __llvm_libc +} // namespace LIBC_NAMESPACE diff --git a/libc/src/stdio/gpu/fgets.cpp b/libc/src/stdio/gpu/fgets.cpp index df00451..4cabd15 100644 --- a/libc/src/stdio/gpu/fgets.cpp +++ b/libc/src/stdio/gpu/fgets.cpp @@ -14,7 +14,7 @@ #include <stddef.h> #include <stdio.h> -namespace __llvm_libc { +namespace LIBC_NAMESPACE { LLVM_LIBC_FUNCTION(char *, fgets, (char *__restrict str, int count, @@ -33,8 +33,8 @@ LLVM_LIBC_FUNCTION(char *, fgets, str[i] = c; } - bool has_error = __llvm_libc::ferror(stream); - bool has_eof = __llvm_libc::feof(stream); + bool has_error = LIBC_NAMESPACE::ferror(stream); + bool has_eof = LIBC_NAMESPACE::feof(stream); if (has_error || (i == 0 && has_eof)) return nullptr; @@ -43,4 +43,4 @@ LLVM_LIBC_FUNCTION(char *, fgets, return str; } -} // namespace __llvm_libc +} // namespace LIBC_NAMESPACE diff --git a/libc/src/stdio/gpu/file.h b/libc/src/stdio/gpu/file.h index 4b07f9f..2cab2e6 100644 --- a/libc/src/stdio/gpu/file.h +++ b/libc/src/stdio/gpu/file.h @@ -11,7 +11,7 @@ #include <stdio.h> -namespace __llvm_libc { +namespace LIBC_NAMESPACE { namespace file { enum Stream { @@ -94,4 +94,4 @@ LIBC_INLINE uint64_t read(::FILE *f, void *data, size_t size) { } } // namespace file -} // namespace __llvm_libc +} // namespace LIBC_NAMESPACE diff --git a/libc/src/stdio/gpu/fopen.cpp b/libc/src/stdio/gpu/fopen.cpp index 5d88b65..41d2c89 100644 --- a/libc/src/stdio/gpu/fopen.cpp +++ b/libc/src/stdio/gpu/fopen.cpp @@ -12,7 +12,7 @@ #include <stdio.h> -namespace __llvm_libc { +namespace LIBC_NAMESPACE { LLVM_LIBC_FUNCTION(::FILE *, fopen, (const char *__restrict path, const char *__restrict mode)) { @@ -29,4 +29,4 @@ LLVM_LIBC_FUNCTION(::FILE *, fopen, return reinterpret_cast<FILE *>(file); } -} // namespace __llvm_libc +} // namespace LIBC_NAMESPACE diff --git a/libc/src/stdio/gpu/fputc.cpp b/libc/src/stdio/gpu/fputc.cpp index 90d2389..e6ef12f 100644 --- a/libc/src/stdio/gpu/fputc.cpp +++ b/libc/src/stdio/gpu/fputc.cpp @@ -11,7 +11,7 @@ #include <stdio.h> -namespace __llvm_libc { +namespace LIBC_NAMESPACE { LLVM_LIBC_FUNCTION(int, fputc, (int c, ::FILE *stream)) { unsigned char uc = static_cast<unsigned char>(c); @@ -23,4 +23,4 @@ LLVM_LIBC_FUNCTION(int, fputc, (int c, ::FILE *stream)) { return 0; } -} // namespace __llvm_libc +} // namespace LIBC_NAMESPACE diff --git a/libc/src/stdio/gpu/fputs.cpp b/libc/src/stdio/gpu/fputs.cpp index c5919e8..1b6e073 100644 --- a/libc/src/stdio/gpu/fputs.cpp +++ b/libc/src/stdio/gpu/fputs.cpp @@ -13,7 +13,7 @@ #include <stdio.h> -namespace __llvm_libc { +namespace LIBC_NAMESPACE { LLVM_LIBC_FUNCTION(int, fputs, (const char *__restrict str, ::FILE *__restrict stream)) { @@ -24,4 +24,4 @@ LLVM_LIBC_FUNCTION(int, fputs, return 0; } -} // namespace __llvm_libc +} // namespace LIBC_NAMESPACE diff --git a/libc/src/stdio/gpu/fread.cpp b/libc/src/stdio/gpu/fread.cpp index 2b9112e..fe367ae1 100644 --- a/libc/src/stdio/gpu/fread.cpp +++ b/libc/src/stdio/gpu/fread.cpp @@ -11,7 +11,7 @@ #include <stdio.h> -namespace __llvm_libc { +namespace LIBC_NAMESPACE { LLVM_LIBC_FUNCTION(size_t, fread, (void *__restrict buffer, size_t size, size_t nmemb, @@ -22,4 +22,4 @@ LLVM_LIBC_FUNCTION(size_t, fread, return result / size; } -} // namespace __llvm_libc +} // namespace LIBC_NAMESPACE diff --git a/libc/src/stdio/gpu/fwrite.cpp b/libc/src/stdio/gpu/fwrite.cpp index fccaabd..a059bd5 100644 --- a/libc/src/stdio/gpu/fwrite.cpp +++ b/libc/src/stdio/gpu/fwrite.cpp @@ -11,7 +11,7 @@ #include <stdio.h> -namespace __llvm_libc { +namespace LIBC_NAMESPACE { LLVM_LIBC_FUNCTION(size_t, fwrite, (const void *__restrict buffer, size_t size, size_t nmemb, @@ -23,4 +23,4 @@ LLVM_LIBC_FUNCTION(size_t, fwrite, return result / size; } -} // namespace __llvm_libc +} // namespace LIBC_NAMESPACE diff --git a/libc/src/stdio/gpu/getc.cpp b/libc/src/stdio/gpu/getc.cpp index a227222..b50e396 100644 --- a/libc/src/stdio/gpu/getc.cpp +++ b/libc/src/stdio/gpu/getc.cpp @@ -11,7 +11,7 @@ #include <stdio.h> -namespace __llvm_libc { +namespace LIBC_NAMESPACE { LLVM_LIBC_FUNCTION(int, getc, (::FILE * stream)) { unsigned char c; @@ -22,4 +22,4 @@ LLVM_LIBC_FUNCTION(int, getc, (::FILE * stream)) { return c; } -} // namespace __llvm_libc +} // namespace LIBC_NAMESPACE diff --git a/libc/src/stdio/gpu/getchar.cpp b/libc/src/stdio/gpu/getchar.cpp index a7a6e6c..c8a0041 100644 --- a/libc/src/stdio/gpu/getchar.cpp +++ b/libc/src/stdio/gpu/getchar.cpp @@ -11,7 +11,7 @@ #include <stdio.h> -namespace __llvm_libc { +namespace LIBC_NAMESPACE { LLVM_LIBC_FUNCTION(int, getchar, ()) { unsigned char c; @@ -22,4 +22,4 @@ LLVM_LIBC_FUNCTION(int, getchar, ()) { return c; } -} // namespace __llvm_libc +} // namespace LIBC_NAMESPACE diff --git a/libc/src/stdio/gpu/putc.cpp b/libc/src/stdio/gpu/putc.cpp index d450edb..b5ecbfc 100644 --- a/libc/src/stdio/gpu/putc.cpp +++ b/libc/src/stdio/gpu/putc.cpp @@ -11,7 +11,7 @@ #include <stdio.h> -namespace __llvm_libc { +namespace LIBC_NAMESPACE { LLVM_LIBC_FUNCTION(int, putc, (int c, ::FILE *stream)) { unsigned char uc = static_cast<unsigned char>(c); @@ -23,4 +23,4 @@ LLVM_LIBC_FUNCTION(int, putc, (int c, ::FILE *stream)) { return 0; } -} // namespace __llvm_libc +} // namespace LIBC_NAMESPACE diff --git a/libc/src/stdio/gpu/putchar.cpp b/libc/src/stdio/gpu/putchar.cpp index df57754..57663ee 100644 --- a/libc/src/stdio/gpu/putchar.cpp +++ b/libc/src/stdio/gpu/putchar.cpp @@ -11,7 +11,7 @@ #include <stdio.h> -namespace __llvm_libc { +namespace LIBC_NAMESPACE { LLVM_LIBC_FUNCTION(int, putchar, (int c)) { unsigned char uc = static_cast<unsigned char>(c); @@ -23,4 +23,4 @@ LLVM_LIBC_FUNCTION(int, putchar, (int c)) { return 0; } -} // namespace __llvm_libc +} // namespace LIBC_NAMESPACE diff --git a/libc/src/stdio/gpu/puts.cpp b/libc/src/stdio/gpu/puts.cpp index e50e2cc..10573a8 100644 --- a/libc/src/stdio/gpu/puts.cpp +++ b/libc/src/stdio/gpu/puts.cpp @@ -13,7 +13,7 @@ #include <stdio.h> -namespace __llvm_libc { +namespace LIBC_NAMESPACE { LLVM_LIBC_FUNCTION(int, puts, (const char *__restrict str)) { cpp::string_view str_view(str); @@ -24,4 +24,4 @@ LLVM_LIBC_FUNCTION(int, puts, (const char *__restrict str)) { return 0; } -} // namespace __llvm_libc +} // namespace LIBC_NAMESPACE diff --git a/libc/src/stdio/gpu/stderr.cpp b/libc/src/stdio/gpu/stderr.cpp index 5e7b79e..7084682 100644 --- a/libc/src/stdio/gpu/stderr.cpp +++ b/libc/src/stdio/gpu/stderr.cpp @@ -8,9 +8,9 @@ #include <stdio.h> -namespace __llvm_libc { +namespace LIBC_NAMESPACE { static struct { } stub; FILE *stderr = reinterpret_cast<FILE *>(&stub); -} // namespace __llvm_libc -extern "C" FILE *stderr = reinterpret_cast<FILE *>(&__llvm_libc::stub); +} // namespace LIBC_NAMESPACE +extern "C" FILE *stderr = reinterpret_cast<FILE *>(&LIBC_NAMESPACE::stub); diff --git a/libc/src/stdio/gpu/stdin.cpp b/libc/src/stdio/gpu/stdin.cpp index 408852b..1a58461 100644 --- a/libc/src/stdio/gpu/stdin.cpp +++ b/libc/src/stdio/gpu/stdin.cpp @@ -8,9 +8,9 @@ #include <stdio.h> -namespace __llvm_libc { +namespace LIBC_NAMESPACE { static struct { } stub; FILE *stdin = reinterpret_cast<FILE *>(&stub); -} // namespace __llvm_libc -extern "C" FILE *stdin = reinterpret_cast<FILE *>(&__llvm_libc::stub); +} // namespace LIBC_NAMESPACE +extern "C" FILE *stdin = reinterpret_cast<FILE *>(&LIBC_NAMESPACE::stub); diff --git a/libc/src/stdio/gpu/stdout.cpp b/libc/src/stdio/gpu/stdout.cpp index 02425d3..abeeff2 100644 --- a/libc/src/stdio/gpu/stdout.cpp +++ b/libc/src/stdio/gpu/stdout.cpp @@ -8,9 +8,9 @@ #include <stdio.h> -namespace __llvm_libc { +namespace LIBC_NAMESPACE { static struct { } stub; FILE *stdout = reinterpret_cast<FILE *>(&stub); -} // namespace __llvm_libc -extern "C" FILE *stdout = reinterpret_cast<FILE *>(&__llvm_libc::stub); +} // namespace LIBC_NAMESPACE +extern "C" FILE *stdout = reinterpret_cast<FILE *>(&LIBC_NAMESPACE::stub); |