[libc-commits] [libc] [libc] Fix leftover `LIBC_NAMESPACE` after porting it (PR #113960)
Joseph Huber via libc-commits
libc-commits at lists.llvm.org
Mon Oct 28 13:28:35 PDT 2024
https://github.com/jhuber6 created https://github.com/llvm/llvm-project/pull/113960
Summary:
There are a few of these leftover, they should all use the
`LIBC_NAMESPACE_DECL` version because that implies visibility.
>From 917818b06986c751dcc0cac99497a8e49c85ad9a Mon Sep 17 00:00:00 2001
From: Joseph Huber <huberjn at outlook.com>
Date: Mon, 28 Oct 2024 15:27:11 -0500
Subject: [PATCH] [libc] Fix leftover `LIBC_NAMESPACE` after porting it
Summary:
There are a few of these leftover, they should all use the
`LIBC_NAMESPACE_DECL` version because that implies visibility.
---
libc/src/math/cbrt.h | 2 +-
libc/src/stdio/gpu/fprintf.cpp | 2 +-
libc/src/stdio/gpu/printf.cpp | 2 +-
libc/src/stdio/gpu/vfprintf.cpp | 2 +-
libc/src/stdio/gpu/vfprintf_utils.h | 2 +-
libc/src/stdio/gpu/vprintf.cpp | 2 +-
libc/src/stdio/vsscanf.h | 2 +-
7 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/libc/src/math/cbrt.h b/libc/src/math/cbrt.h
index a7d5fe80e57b3c..751a3da87a6204 100644
--- a/libc/src/math/cbrt.h
+++ b/libc/src/math/cbrt.h
@@ -9,7 +9,7 @@
#ifndef LLVM_LIBC_SRC_MATH_CBRT_H
#define LLVM_LIBC_SRC_MATH_CBRT_H
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
double cbrt(double x);
diff --git a/libc/src/stdio/gpu/fprintf.cpp b/libc/src/stdio/gpu/fprintf.cpp
index 6222589cc4bab9..355017f50bb97e 100644
--- a/libc/src/stdio/gpu/fprintf.cpp
+++ b/libc/src/stdio/gpu/fprintf.cpp
@@ -16,7 +16,7 @@
#include <stdarg.h>
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(int, fprintf,
(::FILE *__restrict stream, const char *__restrict format,
diff --git a/libc/src/stdio/gpu/printf.cpp b/libc/src/stdio/gpu/printf.cpp
index d9903193ef1658..7a67df428cf3c3 100644
--- a/libc/src/stdio/gpu/printf.cpp
+++ b/libc/src/stdio/gpu/printf.cpp
@@ -15,7 +15,7 @@
#include <stdarg.h>
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(int, printf, (const char *__restrict format, ...)) {
va_list vlist;
diff --git a/libc/src/stdio/gpu/vfprintf.cpp b/libc/src/stdio/gpu/vfprintf.cpp
index 961cfa48579e0a..adb5e2308cf1de 100644
--- a/libc/src/stdio/gpu/vfprintf.cpp
+++ b/libc/src/stdio/gpu/vfprintf.cpp
@@ -14,7 +14,7 @@
#include "src/errno/libc_errno.h"
#include "src/stdio/gpu/vfprintf_utils.h"
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(int, vfprintf,
(::FILE *__restrict stream, const char *__restrict format,
diff --git a/libc/src/stdio/gpu/vfprintf_utils.h b/libc/src/stdio/gpu/vfprintf_utils.h
index 93ce1649869fc1..2ca84ffd3d97f1 100644
--- a/libc/src/stdio/gpu/vfprintf_utils.h
+++ b/libc/src/stdio/gpu/vfprintf_utils.h
@@ -12,7 +12,7 @@
#include "src/stdio/gpu/file.h"
#include "src/string/string_utils.h"
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
template <uint16_t opcode>
LIBC_INLINE int vfprintf_impl(::FILE *__restrict file,
diff --git a/libc/src/stdio/gpu/vprintf.cpp b/libc/src/stdio/gpu/vprintf.cpp
index 2bb74d7f017b59..90126630b9c308 100644
--- a/libc/src/stdio/gpu/vprintf.cpp
+++ b/libc/src/stdio/gpu/vprintf.cpp
@@ -13,7 +13,7 @@
#include "src/errno/libc_errno.h"
#include "src/stdio/gpu/vfprintf_utils.h"
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
LLVM_LIBC_FUNCTION(int, vprintf,
(const char *__restrict format, va_list vlist)) {
diff --git a/libc/src/stdio/vsscanf.h b/libc/src/stdio/vsscanf.h
index 992c44d3d95b9a..72274318611cd8 100644
--- a/libc/src/stdio/vsscanf.h
+++ b/libc/src/stdio/vsscanf.h
@@ -11,7 +11,7 @@
#include <stdarg.h>
-namespace LIBC_NAMESPACE {
+namespace LIBC_NAMESPACE_DECL {
int vsscanf(const char *s, const char *format, va_list vlist);
More information about the libc-commits
mailing list