Skip to content

Commit a749484

Browse files
[ExecutionEngine] Remove unnecessary casts (NFC) (llvm#151442)
WA, WA1, and WA2 are already of char *.
1 parent e4d4783 commit a749484

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

llvm/unittests/ExecutionEngine/Orc/MemoryMapperTest.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ TEST(MemoryMapperTest, InitializeDeinitialize) {
8181
{
8282
// Provide working memory
8383
char *WA1 = Mapper->prepare(Mem1->Start, HW.size() + 1);
84-
std::strcpy(static_cast<char *>(WA1), HW.c_str());
84+
std::strcpy(WA1, HW.c_str());
8585
}
8686

8787
// A structure to be passed to initialize
@@ -106,7 +106,7 @@ TEST(MemoryMapperTest, InitializeDeinitialize) {
106106

107107
{
108108
char *WA2 = Mapper->prepare(Mem1->Start + PageSize, HW.size() + 1);
109-
std::strcpy(static_cast<char *>(WA2), HW.c_str());
109+
std::strcpy(WA2, HW.c_str());
110110
}
111111

112112
MemoryMapper::AllocInfo Alloc2;
@@ -159,7 +159,7 @@ TEST(MemoryMapperTest, InitializeDeinitialize) {
159159
EXPECT_THAT_ERROR(Mem2.takeError(), Succeeded());
160160

161161
char *WA = Mapper->prepare(Mem2->Start, HW.size() + 1);
162-
std::strcpy(static_cast<char *>(WA), HW.c_str());
162+
std::strcpy(WA, HW.c_str());
163163

164164
MemoryMapper::AllocInfo Alloc3;
165165
{

0 commit comments

Comments
 (0)