From 71b6a24dcc2415a60b44cba9842c0428c30155e0 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Wed, 30 Jul 2025 10:33:05 -0700 Subject: [PATCH] [ExecutionEngine] Remove unnecessary casts (NFC) WA, WA1, and WA2 are already of char *. --- llvm/unittests/ExecutionEngine/Orc/MemoryMapperTest.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/llvm/unittests/ExecutionEngine/Orc/MemoryMapperTest.cpp b/llvm/unittests/ExecutionEngine/Orc/MemoryMapperTest.cpp index 6ab659d38f5ca..fea9eabbb465b 100644 --- a/llvm/unittests/ExecutionEngine/Orc/MemoryMapperTest.cpp +++ b/llvm/unittests/ExecutionEngine/Orc/MemoryMapperTest.cpp @@ -81,7 +81,7 @@ TEST(MemoryMapperTest, InitializeDeinitialize) { { // Provide working memory char *WA1 = Mapper->prepare(Mem1->Start, HW.size() + 1); - std::strcpy(static_cast(WA1), HW.c_str()); + std::strcpy(WA1, HW.c_str()); } // A structure to be passed to initialize @@ -106,7 +106,7 @@ TEST(MemoryMapperTest, InitializeDeinitialize) { { char *WA2 = Mapper->prepare(Mem1->Start + PageSize, HW.size() + 1); - std::strcpy(static_cast(WA2), HW.c_str()); + std::strcpy(WA2, HW.c_str()); } MemoryMapper::AllocInfo Alloc2; @@ -159,7 +159,7 @@ TEST(MemoryMapperTest, InitializeDeinitialize) { EXPECT_THAT_ERROR(Mem2.takeError(), Succeeded()); char *WA = Mapper->prepare(Mem2->Start, HW.size() + 1); - std::strcpy(static_cast(WA), HW.c_str()); + std::strcpy(WA, HW.c_str()); MemoryMapper::AllocInfo Alloc3; {