[libc-commits] [libc] 2b7227d - [libc] Fix RPC server global after mass replace of __llvm_libc

Joseph Huber via libc-commits libc-commits at lists.llvm.org
Tue Sep 26 12:29:01 PDT 2023


Author: Joseph Huber
Date: 2023-09-26T14:28:48-05:00
New Revision: 2b7227db1e0f1e9146edd758004190da8d0cb9b9

URL: https://github.com/llvm/llvm-project/commit/2b7227db1e0f1e9146edd758004190da8d0cb9b9
DIFF: https://github.com/llvm/llvm-project/commit/2b7227db1e0f1e9146edd758004190da8d0cb9b9.diff

LOG: [libc] Fix RPC server global after mass replace of __llvm_libc

Summary:
This variable needs a reserved name starting with `__`. It was
mistakenly changed with a mass replace. It happened to work because the
tests still picked up the associated symbol, but it just became a bad
name because it's not reserved anymore.

Added: 
    

Modified: 
    libc/src/__support/RPC/rpc_client.cpp
    libc/utils/gpu/server/rpc_server.h

Removed: 
    


################################################################################
diff  --git a/libc/src/__support/RPC/rpc_client.cpp b/libc/src/__support/RPC/rpc_client.cpp
index e223caf2a16a8e4..8367d54fada63bc 100644
--- a/libc/src/__support/RPC/rpc_client.cpp
+++ b/libc/src/__support/RPC/rpc_client.cpp
@@ -18,7 +18,7 @@ Client client;
 /// Externally visible symbol to signify the usage of an RPC client to
 /// whomever needs to run the server as well as provide a way to initialize
 /// the client with a copy..
-extern "C" [[gnu::visibility("protected")]] void *LIBC_NAMESPACE_rpc_client =
+extern "C" [[gnu::visibility("protected")]] const void *__llvm_libc_rpc_client =
     &client;
 
 } // namespace rpc

diff  --git a/libc/utils/gpu/server/rpc_server.h b/libc/utils/gpu/server/rpc_server.h
index 6b87830890b8379..2fde0001185c16b 100644
--- a/libc/utils/gpu/server/rpc_server.h
+++ b/libc/utils/gpu/server/rpc_server.h
@@ -22,7 +22,7 @@ const uint64_t RPC_MAXIMUM_PORT_COUNT = 512;
 
 /// The symbol name associated with the client for use with the LLVM C library
 /// implementation.
-const char *const rpc_client_symbol_name = "LIBC_NAMESPACE_rpc_client";
+const char *const rpc_client_symbol_name = "__llvm_libc_rpc_client";
 
 /// status codes.
 typedef enum {


        


More information about the libc-commits mailing list