Skip to content

Commit d7c20a6

Browse files
committed
[libc][NFC] Move RPC opcodes to the 'shared/' directory as well
1 parent 29828b2 commit d7c20a6

File tree

8 files changed

+8
-13
lines changed

8 files changed

+8
-13
lines changed

libc/include/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -767,7 +767,6 @@ if(LIBC_TARGET_OS_IS_GPU)
767767
gpu/rpc.h
768768
DEPENDS
769769
.llvm_libc_common_h
770-
.llvm-libc-types.rpc_opcodes_t
771770
)
772771
endif()
773772

libc/include/llvm-libc-types/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -122,7 +122,6 @@ add_header(struct_sockaddr_un HDR struct_sockaddr_un.h DEPENDS .sa_family_t)
122122
add_header(struct_sockaddr HDR struct_sockaddr.h DEPENDS .sa_family_t)
123123
add_header(struct_iovec HDR struct_iovec.h DEPENDS .size_t)
124124
add_header(struct_msghdr HDR struct_msghdr.h DEPENDS .size_t .socklen_t .struct_iovec)
125-
add_header(rpc_opcodes_t HDR rpc_opcodes_t.h)
126125
add_header(ACTION HDR ACTION.h)
127126
add_header(ENTRY HDR ENTRY.h)
128127
add_header(struct_hsearch_data HDR struct_hsearch_data.h)

libc/include/llvm-libc-types/rpc_opcodes_t.h renamed to libc/shared/rpc_opcodes.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
//
77
//===----------------------------------------------------------------------===//
88

9-
#ifndef LLVM_LIBC_TYPES_RPC_OPCODES_T_H
10-
#define LLVM_LIBC_TYPES_RPC_OPCODES_T_H
9+
#ifndef LLVM_LIBC_SHARED_RPC_OPCODES_H
10+
#define LLVM_LIBC_SHARED_RPC_OPCODES_H
1111

1212
#define LLVM_LIBC_RPC_BASE 'c'
1313
#define LLVM_LIBC_OPCODE(n) (LLVM_LIBC_RPC_BASE << 24 | n)
@@ -46,4 +46,4 @@ typedef enum {
4646
RPC_LAST = 0xFFFFFFFF,
4747
} rpc_opcode_t;
4848

49-
#endif // LLVM_LIBC_TYPES_RPC_OPCODES_T_H
49+
#endif // LLVM_LIBC_SHARED_RPC_OPCODES_H

libc/src/__support/RPC/rpc_client.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@
1010
#define LLVM_LIBC_SRC___SUPPORT_RPC_RPC_CLIENT_H
1111

1212
#include "shared/rpc.h"
13+
#include "shared/rpc_opcodes.h"
1314

14-
#include "include/llvm-libc-types/rpc_opcodes_t.h"
1515
#include "src/__support/CPP/type_traits.h"
1616
#include "src/__support/macros/config.h"
1717

libc/utils/gpu/loader/Loader.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,10 @@
1111

1212
#include "utils/gpu/server/llvmlibc_rpc_server.h"
1313

14-
#include "include/llvm-libc-types/rpc_opcodes_t.h"
1514
#include "include/llvm-libc-types/test_rpc_opcodes_t.h"
15+
1616
#include "shared/rpc.h"
17+
#include "shared/rpc_opcodes.h"
1718

1819
#include <cstddef>
1920
#include <cstdint>

libc/utils/gpu/server/CMakeLists.txt

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,6 @@ target_compile_definitions(llvmlibc_rpc_server PUBLIC
2626
install(FILES ${CMAKE_CURRENT_SOURCE_DIR}/llvmlibc_rpc_server.h
2727
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
2828
COMPONENT libc-headers)
29-
install(FILES ${LIBC_SOURCE_DIR}/include/llvm-libc-types/rpc_opcodes_t.h
30-
DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}
31-
RENAME llvmlibc_rpc_opcodes.h
32-
COMPONENT libc-headers)
3329
install(TARGETS llvmlibc_rpc_server
3430
ARCHIVE DESTINATION "lib${LLVM_LIBDIR_SUFFIX}"
3531
COMPONENT libc)

libc/utils/gpu/server/rpc_server.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@
1515
#include <limits.h>
1616

1717
#include "shared/rpc.h"
18+
#include "shared/rpc_opcodes.h"
1819

1920
#include "llvmlibc_rpc_server.h"
2021

21-
#include "include/llvm-libc-types/rpc_opcodes_t.h"
2222
#include "src/__support/arg_list.h"
2323
#include "src/stdio/printf_core/converter.h"
2424
#include "src/stdio/printf_core/parser.h"

offload/plugins-nextgen/common/src/RPC.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
// TODO: This should be included unconditionally and cleaned up.
1616
#if defined(LIBOMPTARGET_RPC_SUPPORT)
17-
#include "include/llvm-libc-types/rpc_opcodes_t.h"
1817
#include "llvmlibc_rpc_server.h"
1918
#include "shared/rpc.h"
19+
#include "shared/rpc_opcodes.h"
2020
#endif
2121

2222
using namespace llvm;

0 commit comments

Comments
 (0)