[libc-commits] [PATCH] D77277: [libc] Fix memcpy to adhere to qualified calls.

Paula Toth via Phabricator via libc-commits libc-commits at lists.llvm.org
Fri Apr 3 15:44:16 PDT 2020


This revision was automatically updated to reflect the committed changes.
Closed by commit rG90eb7be6a175: [libc] Fix memcpy to adhere to qualified calls. (authored by PaulkaToast).

Changed prior to commit:
  https://reviews.llvm.org/D77277?vs=254918&id=254934#toc

Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D77277/new/

https://reviews.llvm.org/D77277

Files:
  libc/fuzzing/string/CMakeLists.txt
  libc/src/string/CMakeLists.txt
  libc/src/string/strcpy.cpp
  libc/test/src/string/CMakeLists.txt


Index: libc/test/src/string/CMakeLists.txt
===================================================================
--- libc/test/src/string/CMakeLists.txt
+++ libc/test/src/string/CMakeLists.txt
@@ -12,6 +12,8 @@
     strcat
     strcpy
     strlen
+# TODO (sivachandra): remove redundant deps.
+    memcpy
 )
 
 add_libc_unittest(
@@ -23,6 +25,8 @@
   DEPENDS
     strcpy
     strlen
+# TODO (sivachandra): remove redundant deps.
+    memcpy
 )
 
 add_libc_unittest(
Index: libc/src/string/strcpy.cpp
===================================================================
--- libc/src/string/strcpy.cpp
+++ libc/src/string/strcpy.cpp
@@ -8,6 +8,7 @@
 
 #include "src/string/strcpy.h"
 #include "src/string/strlen.h"
+#include "src/string/memcpy.h"
 
 #include "src/__support/common.h"
 
@@ -15,7 +16,7 @@
 
 char *LLVM_LIBC_ENTRYPOINT(strcpy)(char *dest, const char *src) {
   return reinterpret_cast<char *>(
-      ::memcpy(dest, src, __llvm_libc::strlen(src) + 1));
+      __llvm_libc::memcpy(dest, src, __llvm_libc::strlen(src) + 1));
 }
 
 } // namespace __llvm_libc
Index: libc/src/string/CMakeLists.txt
===================================================================
--- libc/src/string/CMakeLists.txt
+++ libc/src/string/CMakeLists.txt
@@ -21,6 +21,7 @@
   DEPENDS
     string_h
     strlen
+    memcpy
 )
 
 add_entrypoint_object(
Index: libc/fuzzing/string/CMakeLists.txt
===================================================================
--- libc/fuzzing/string/CMakeLists.txt
+++ libc/fuzzing/string/CMakeLists.txt
@@ -5,4 +5,5 @@
   DEPENDS
     strcpy
     strlen
+    memcpy
 )


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D77277.254934.patch
Type: text/x-patch
Size: 1592 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20200403/1c556a72/attachment.bin>


More information about the libc-commits mailing list