Skip to content

Commit 1f57834

Browse files
committed
[libc][NFC] Rename files
This patch mostly renames files so it better reflects the function they declare. Reviewed By: michaelrj Differential Revision: https://reviews.llvm.org/D155607
1 parent 865b119 commit 1f57834

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

64 files changed

+236
-240
lines changed

libc/src/__support/CPP/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,8 +64,8 @@ add_header_library(
6464
.string_view
6565
libc.src.__support.common
6666
libc.src.__support.integer_to_string
67-
libc.src.string.memory_utils.memcpy_implementation
68-
libc.src.string.memory_utils.memset_implementation
67+
libc.src.string.memory_utils.inline_memcpy
68+
libc.src.string.memory_utils.inline_memset
6969
libc.src.string.string_utils
7070
)
7171

libc/src/__support/CPP/string.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111

1212
#include "src/__support/CPP/string_view.h"
1313
#include "src/__support/integer_to_string.h" // IntegerToString
14-
#include "src/string/memory_utils/memcpy_implementations.h"
15-
#include "src/string/memory_utils/memset_implementations.h"
14+
#include "src/string/memory_utils/inline_memcpy.h"
15+
#include "src/string/memory_utils/inline_memset.h"
1616
#include "src/string/string_utils.h" // string_length
1717

1818
#include <stddef.h> // size_t

libc/src/__support/OSUtil/gpu/CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,5 @@ add_object_library(
1010
libc.src.__support.common
1111
libc.src.__support.CPP.string_view
1212
libc.src.__support.RPC.rpc_client
13-
libc.src.string.memory_utils.memcpy_implementation
13+
libc.src.string.memory_utils.inline_memcpy
1414
)

libc/src/__support/OSUtil/gpu/io.cpp

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010

1111
#include "src/__support/CPP/string_view.h"
1212
#include "src/__support/RPC/rpc_client.h"
13-
#include "src/string/memory_utils/memcpy_implementations.h"
1413

1514
namespace __llvm_libc {
1615

libc/src/__support/RPC/rpc.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#include "src/__support/CPP/functional.h"
2424
#include "src/__support/CPP/optional.h"
2525
#include "src/__support/GPU/utils.h"
26-
#include "src/string/memory_utils/memcpy_implementations.h"
26+
#include "src/string/memory_utils/inline_memcpy.h"
2727

2828
#include <stdint.h>
2929

libc/src/stdio/printf_core/CMakeLists.txt

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ add_object_library(
5353
HDRS
5454
string_writer.h
5555
DEPENDS
56-
libc.src.__support.CPP.string_view
57-
libc.src.string.memory_utils.memcpy_implementation
58-
libc.src.string.memory_utils.memset_implementation
5956
.core_structs
57+
libc.src.__support.CPP.string_view
58+
libc.src.string.memory_utils.inline_memcpy
59+
libc.src.string.memory_utils.inline_memset
6060
)
6161

6262
add_object_library(
@@ -130,11 +130,11 @@ add_header_library(
130130
HDRS
131131
file_writer.h
132132
DEPENDS
133+
.core_structs
133134
libc.include.stdio
134-
libc.src.__support.File.file
135135
libc.src.__support.CPP.string_view
136-
libc.src.string.memory_utils.memset_implementation
137-
.core_structs
136+
libc.src.__support.File.file
137+
libc.src.string.memory_utils.inline_memset
138138
)
139139

140140
add_header_library(

libc/src/stdio/printf_core/string_writer.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
#include "src/stdio/printf_core/string_writer.h"
1010
#include "src/__support/CPP/string_view.h"
1111
#include "src/stdio/printf_core/core_structs.h"
12-
#include "src/string/memory_utils/memcpy_implementations.h"
13-
#include "src/string/memory_utils/memset_implementations.h"
12+
#include "src/string/memory_utils/inline_memcpy.h"
13+
#include "src/string/memory_utils/inline_memset.h"
1414
#include <stddef.h>
1515

1616
namespace __llvm_libc {

libc/src/stdio/printf_core/string_writer.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
#define LLVM_LIBC_SRC_STDIO_PRINTF_CORE_STRING_WRITER_H
1111

1212
#include "src/__support/CPP/string_view.h"
13-
#include "src/string/memory_utils/memcpy_implementations.h"
1413
#include <stddef.h>
1514

1615
namespace __llvm_libc {

libc/src/string/CMakeLists.txt

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ add_header_library(
55
HDRS
66
string_utils.h
77
DEPENDS
8+
.memory_utils.inline_bzero
9+
.memory_utils.inline_memcpy
810
libc.include.stdlib
9-
libc.src.__support.CPP.bitset
1011
libc.src.__support.common
11-
.memory_utils.memcpy_implementation
12-
.memory_utils.bzero_implementation
12+
libc.src.__support.CPP.bitset
1313
)
1414

1515
add_header_library(
1616
allocating_string_utils
1717
HDRS
1818
allocating_string_utils.h
1919
DEPENDS
20-
.memory_utils.memcpy_implementation
20+
.memory_utils.inline_memcpy
2121
libc.include.stdlib
2222
libc.src.__support.CPP.optional
2323
libc.src.__support.macros.config
@@ -56,7 +56,7 @@ add_entrypoint_object(
5656
HDRS
5757
mempcpy.h
5858
DEPENDS
59-
.memory_utils.memcpy_implementation
59+
.memory_utils.inline_memcpy
6060
)
6161

6262
add_entrypoint_object(
@@ -66,7 +66,7 @@ add_entrypoint_object(
6666
HDRS
6767
memmem.h
6868
DEPENDS
69-
.memory_utils.memmem_implementation
69+
.memory_utils.inline_memmem
7070
)
7171

7272
add_entrypoint_object(
@@ -115,7 +115,7 @@ add_entrypoint_object(
115115
HDRS
116116
stpncpy.h
117117
DEPENDS
118-
.memory_utils.bzero_implementation
118+
.memory_utils.inline_bzero
119119
)
120120

121121
add_entrypoint_object(
@@ -156,7 +156,7 @@ add_entrypoint_object(
156156
HDRS
157157
strcmp.h
158158
DEPENDS
159-
.memory_utils.strcmp_implementation
159+
.memory_utils.inline_strcmp
160160
)
161161

162162
add_entrypoint_object(
@@ -166,7 +166,7 @@ add_entrypoint_object(
166166
HDRS
167167
strcasecmp.h
168168
DEPENDS
169-
.memory_utils.strcmp_implementation
169+
.memory_utils.inline_strcmp
170170
libc.src.__support.ctype_utils
171171
)
172172

@@ -177,7 +177,7 @@ add_entrypoint_object(
177177
HDRS
178178
strcasestr.h
179179
DEPENDS
180-
.memory_utils.strstr_implementation
180+
.memory_utils.inline_strstr
181181
libc.src.__support.ctype_utils
182182
)
183183

@@ -196,7 +196,7 @@ add_entrypoint_object(
196196
HDRS
197197
strcpy.h
198198
DEPENDS
199-
.memory_utils.memcpy_implementation
199+
.memory_utils.inline_memcpy
200200
.string_utils
201201
)
202202

@@ -217,7 +217,7 @@ add_entrypoint_object(
217217
HDRS
218218
strdup.h
219219
DEPENDS
220-
.memory_utils.memcpy_implementation
220+
.memory_utils.inline_memcpy
221221
.string_utils
222222
libc.include.stdlib
223223
libc.src.errno.errno
@@ -294,7 +294,7 @@ add_entrypoint_object(
294294
HDRS
295295
strncmp.h
296296
DEPENDS
297-
.memory_utils.strcmp_implementation
297+
.memory_utils.inline_strcmp
298298
)
299299

300300
add_entrypoint_object(
@@ -304,7 +304,7 @@ add_entrypoint_object(
304304
HDRS
305305
strncasecmp.h
306306
DEPENDS
307-
.memory_utils.strcmp_implementation
307+
.memory_utils.inline_strcmp
308308
libc.src.__support.ctype_utils
309309
)
310310

@@ -323,7 +323,7 @@ add_entrypoint_object(
323323
HDRS
324324
strndup.h
325325
DEPENDS
326-
.memory_utils.memcpy_implementation
326+
.memory_utils.inline_memcpy
327327
.string_utils
328328
libc.include.stdlib
329329
libc.src.__support.CPP.new
@@ -396,7 +396,7 @@ add_entrypoint_object(
396396
HDRS
397397
strstr.h
398398
DEPENDS
399-
.memory_utils.strstr_implementation
399+
.memory_utils.inline_strstr
400400
)
401401

402402
add_entrypoint_object(
@@ -427,7 +427,7 @@ add_entrypoint_object(
427427
strxfrm.h
428428
DEPENDS
429429
.string_utils
430-
.memory_utils.memcpy_implementation
430+
.memory_utils.inline_memcpy
431431
)
432432

433433
# Helper to define a function with multiple implementations
@@ -504,7 +504,7 @@ function(add_bzero bzero_name)
504504
SRCS ${LIBC_SOURCE_DIR}/src/string/bzero.cpp
505505
HDRS ${LIBC_SOURCE_DIR}/src/string/bzero.h
506506
DEPENDS
507-
.memory_utils.memset_implementation
507+
.memory_utils.inline_memset
508508
libc.include.string
509509
${ARGN}
510510
)
@@ -531,7 +531,7 @@ function(add_memcmp memcmp_name)
531531
SRCS ${LIBC_SOURCE_DIR}/src/string/memcmp.cpp
532532
HDRS ${LIBC_SOURCE_DIR}/src/string/memcmp.h
533533
DEPENDS
534-
.memory_utils.memcmp_implementation
534+
.memory_utils.inline_memcmp
535535
libc.include.string
536536
${ARGN}
537537
)
@@ -561,7 +561,7 @@ function(add_memcpy memcpy_name)
561561
SRCS ${LIBC_SOURCE_DIR}/src/string/memcpy.cpp
562562
HDRS ${LIBC_SOURCE_DIR}/src/string/memcpy.h
563563
DEPENDS
564-
.memory_utils.memcpy_implementation
564+
.memory_utils.inline_memcpy
565565
libc.include.string
566566
${ARGN}
567567
)
@@ -595,7 +595,7 @@ function(add_memmove memmove_name)
595595
SRCS ${LIBC_SOURCE_DIR}/src/string/memmove.cpp
596596
HDRS ${LIBC_SOURCE_DIR}/src/string/memmove.h
597597
DEPENDS
598-
.memory_utils.memcpy_implementation
598+
.memory_utils.inline_memcpy
599599
libc.include.string
600600
${ARGN}
601601
)
@@ -627,7 +627,7 @@ function(add_memset memset_name)
627627
SRCS ${LIBC_SOURCE_DIR}/src/string/memset.cpp
628628
HDRS ${LIBC_SOURCE_DIR}/src/string/memset.h
629629
DEPENDS
630-
.memory_utils.memset_implementation
630+
.memory_utils.inline_memset
631631
libc.include.string
632632
${ARGN}
633633
)

libc/src/string/allocating_string_utils.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
#include "src/__support/CPP/new.h"
1313
#include "src/__support/CPP/optional.h"
1414
#include "src/__support/macros/config.h"
15-
#include "src/string/memory_utils/memcpy_implementations.h" // For string_length
15+
#include "src/string/memory_utils/inline_memcpy.h"
1616
#include "src/string/string_utils.h"
1717

1818
#include <stddef.h> // For size_t

libc/src/string/bcmp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include "src/string/bcmp.h"
1010
#include "src/__support/common.h"
11-
#include "src/string/memory_utils/bcmp_implementations.h"
11+
#include "src/string/memory_utils/inline_bcmp.h"
1212

1313
namespace __llvm_libc {
1414

libc/src/string/bcopy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include "src/string/bcopy.h"
1010
#include "src/__support/common.h"
11-
#include "src/string/memory_utils/memmove_implementations.h"
11+
#include "src/string/memory_utils/inline_memmove.h"
1212

1313
namespace __llvm_libc {
1414

libc/src/string/bzero.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include "src/string/bzero.h"
1010
#include "src/__support/common.h"
11-
#include "src/string/memory_utils/bzero_implementations.h"
11+
#include "src/string/memory_utils/inline_bzero.h"
1212

1313
namespace __llvm_libc {
1414

libc/src/string/memcmp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//===----------------------------------------------------------------------===//
88

99
#include "src/string/memcmp.h"
10-
#include "src/string/memory_utils/memcmp_implementations.h"
10+
#include "src/string/memory_utils/inline_memcmp.h"
1111

1212
#include <stddef.h> // size_t
1313

libc/src/string/memcpy.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include "src/string/memcpy.h"
1010
#include "src/__support/common.h"
11-
#include "src/string/memory_utils/memcpy_implementations.h"
11+
#include "src/string/memory_utils/inline_memcpy.h"
1212

1313
namespace __llvm_libc {
1414

libc/src/string/memmem.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
#include "src/string/memmem.h"
1010
#include "src/__support/common.h"
11-
#include "src/string/memory_utils/memmem_implementations.h"
11+
#include "src/string/memory_utils/inline_memmem.h"
1212

1313
namespace __llvm_libc {
1414

@@ -18,8 +18,7 @@ LLVM_LIBC_FUNCTION(void *, memmem,
1818
constexpr auto comp = [](unsigned char l, unsigned char r) -> int {
1919
return l - r;
2020
};
21-
return memmem_implementation(haystack, haystack_len, needle, needle_len,
22-
comp);
21+
return inline_memmem(haystack, haystack_len, needle, needle_len, comp);
2322
}
2423

2524
} // namespace __llvm_libc

libc/src/string/memmove.cpp

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

99
#include "src/string/memmove.h"
10-
#include "src/string/memory_utils/memcpy_implementations.h"
11-
#include "src/string/memory_utils/memmove_implementations.h"
10+
#include "src/string/memory_utils/inline_memcpy.h"
11+
#include "src/string/memory_utils/inline_memmove.h"
1212
#include <stddef.h> // size_t
1313

1414
namespace __llvm_libc {

0 commit comments

Comments
 (0)