Skip to content

Commit 03dcefe

Browse files
authored
[libc] Fix leftover LIBC_NAMESPACE after porting it (#113960)
Summary: There are a few of these leftover, they should all use the `LIBC_NAMESPACE_DECL` version because that implies visibility.
1 parent 7131569 commit 03dcefe

File tree

7 files changed

+19
-14
lines changed

7 files changed

+19
-14
lines changed

libc/src/math/cbrt.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,12 @@
99
#ifndef LLVM_LIBC_SRC_MATH_CBRT_H
1010
#define LLVM_LIBC_SRC_MATH_CBRT_H
1111

12-
namespace LIBC_NAMESPACE {
12+
#include "src/__support/macros/config.h"
13+
14+
namespace LIBC_NAMESPACE_DECL {
1315

1416
double cbrt(double x);
1517

16-
} // namespace LIBC_NAMESPACE
18+
} // namespace LIBC_NAMESPACE_DECL
1719

1820
#endif // LLVM_LIBC_SRC_MATH_CBRT_H

libc/src/stdio/gpu/fprintf.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616

1717
#include <stdarg.h>
1818

19-
namespace LIBC_NAMESPACE {
19+
namespace LIBC_NAMESPACE_DECL {
2020

2121
LLVM_LIBC_FUNCTION(int, fprintf,
2222
(::FILE *__restrict stream, const char *__restrict format,
@@ -29,4 +29,4 @@ LLVM_LIBC_FUNCTION(int, fprintf,
2929
return ret_val;
3030
}
3131

32-
} // namespace LIBC_NAMESPACE
32+
} // namespace LIBC_NAMESPACE_DECL

libc/src/stdio/gpu/printf.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515

1616
#include <stdarg.h>
1717

18-
namespace LIBC_NAMESPACE {
18+
namespace LIBC_NAMESPACE_DECL {
1919

2020
LLVM_LIBC_FUNCTION(int, printf, (const char *__restrict format, ...)) {
2121
va_list vlist;
@@ -26,4 +26,4 @@ LLVM_LIBC_FUNCTION(int, printf, (const char *__restrict format, ...)) {
2626
return ret_val;
2727
}
2828

29-
} // namespace LIBC_NAMESPACE
29+
} // namespace LIBC_NAMESPACE_DECL

libc/src/stdio/gpu/vfprintf.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
#include "src/errno/libc_errno.h"
1515
#include "src/stdio/gpu/vfprintf_utils.h"
1616

17-
namespace LIBC_NAMESPACE {
17+
namespace LIBC_NAMESPACE_DECL {
1818

1919
LLVM_LIBC_FUNCTION(int, vfprintf,
2020
(::FILE *__restrict stream, const char *__restrict format,
@@ -24,4 +24,4 @@ LLVM_LIBC_FUNCTION(int, vfprintf,
2424
return ret_val;
2525
}
2626

27-
} // namespace LIBC_NAMESPACE
27+
} // namespace LIBC_NAMESPACE_DECL

libc/src/stdio/gpu/vfprintf_utils.h

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,11 @@
99
#include "hdr/types/FILE.h"
1010
#include "src/__support/RPC/rpc_client.h"
1111
#include "src/__support/arg_list.h"
12+
#include "src/__support/macros/config.h"
1213
#include "src/stdio/gpu/file.h"
1314
#include "src/string/string_utils.h"
1415

15-
namespace LIBC_NAMESPACE {
16+
namespace LIBC_NAMESPACE_DECL {
1617

1718
template <uint16_t opcode>
1819
LIBC_INLINE int vfprintf_impl(::FILE *__restrict file,
@@ -82,4 +83,4 @@ LIBC_INLINE int vfprintf_internal(::FILE *__restrict stream,
8283
#endif
8384
}
8485

85-
} // namespace LIBC_NAMESPACE
86+
} // namespace LIBC_NAMESPACE_DECL

libc/src/stdio/gpu/vprintf.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
#include "src/errno/libc_errno.h"
1414
#include "src/stdio/gpu/vfprintf_utils.h"
1515

16-
namespace LIBC_NAMESPACE {
16+
namespace LIBC_NAMESPACE_DECL {
1717

1818
LLVM_LIBC_FUNCTION(int, vprintf,
1919
(const char *__restrict format, va_list vlist)) {
@@ -22,4 +22,4 @@ LLVM_LIBC_FUNCTION(int, vprintf,
2222
return ret_val;
2323
}
2424

25-
} // namespace LIBC_NAMESPACE
25+
} // namespace LIBC_NAMESPACE_DECL

libc/src/stdio/vsscanf.h

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,14 @@
99
#ifndef LLVM_LIBC_SRC_STDIO_VSSCANF_H
1010
#define LLVM_LIBC_SRC_STDIO_VSSCANF_H
1111

12+
#include "src/__support/macros/config.h"
13+
1214
#include <stdarg.h>
1315

14-
namespace LIBC_NAMESPACE {
16+
namespace LIBC_NAMESPACE_DECL {
1517

1618
int vsscanf(const char *s, const char *format, va_list vlist);
1719

18-
} // namespace LIBC_NAMESPACE
20+
} // namespace LIBC_NAMESPACE_DECL
1921

2022
#endif // LLVM_LIBC_SRC_STDIO_VSSCANF_H

0 commit comments

Comments
 (0)