[libc-commits] [PATCH] D74397: [libc] Adding memcpy implementation for x86_64

Guillaume Chatelet via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Mar 12 05:14:02 PDT 2020


gchatelet updated this revision to Diff 249903.
gchatelet marked 9 inline comments as done.
gchatelet added a comment.

Address comments


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D74397

Files:
  libc/cmake/modules/LLVMLibCRules.cmake
  libc/test/src/string/memcpy_test.cpp


Index: libc/test/src/string/memcpy_test.cpp
===================================================================
--- libc/test/src/string/memcpy_test.cpp
+++ libc/test/src/string/memcpy_test.cpp
@@ -8,12 +8,7 @@
 
 #include "utils/CPP/ArrayRef.h"
 #include "utils/UnitTest/Test.h"
-
-namespace __llvm_libc {
-
-void *memcpy(void *__restrict, const void *__restrict, size_t);
-
-} // namespace __llvm_libc
+#include "src/string/memcpy.h"
 
 using __llvm_libc::cpp::Array;
 using __llvm_libc::cpp::ArrayRef;
Index: libc/cmake/modules/LLVMLibCRules.cmake
===================================================================
--- libc/cmake/modules/LLVMLibCRules.cmake
+++ libc/cmake/modules/LLVMLibCRules.cmake
@@ -146,18 +146,6 @@
     PRIVATE
       "${LIBC_BUILD_DIR}/include;${LIBC_SOURCE_DIR};${LIBC_BUILD_DIR}"
   )
-  if(ADD_ENTRYPOINT_OBJ_COMPILE_OPTIONS)
-    target_compile_options(
-      ${target_name}_objects
-      PRIVATE ${ADD_ENTRYPOINT_OBJ_COMPILE_OPTIONS}
-    )
-  endif()
-  if(ADD_ENTRYPOINT_OBJ_COMPILE_DEFINITIONS)
-    target_compile_definitions(
-      ${target_name}_objects
-      PRIVATE ${ADD_ENTRYPOINT_OBJ_COMPILE_DEFINITIONS}
-    )
-  endif()
   add_dependencies(
     ${target_name}_objects
     support_common_h
@@ -320,8 +308,7 @@
 #      SRCS  <list of .cpp files for the test>
 #      HDRS  <list of .h files for the test>
 #      DEPENDS <list of dependencies>
-#      COMPILE_OPTIONS <list of compile options>
-#      COMPILE_DEFINITIONS <list of compile definitions>
+#      COMPILE_OPTIONS <list of special compile options for this target>
 #    )
 function(add_libc_unittest target_name)
   if(NOT LLVM_INCLUDE_TESTS)
@@ -332,7 +319,7 @@
     "LIBC_UNITTEST"
     "" # No optional arguments
     "SUITE" # Single value arguments
-    "SRCS;HDRS;DEPENDS;COMPILE_OPTIONS;COMPILE_DEFINITIONS" # Multi-value arguments
+    "SRCS;HDRS;DEPENDS;COMPILE_OPTIONS" # Multi-value arguments
     ${ARGN}
   )
   if(NOT LIBC_UNITTEST_SRCS)
@@ -376,12 +363,7 @@
       PRIVATE ${LIBC_UNITTEST_COMPILE_OPTIONS}
     )
   endif()
-  if(LIBC_UNITTEST_COMPILE_DEFINITIONS)
-    target_compile_definitions(
-      ${target_name}
-      PRIVATE ${LIBC_UNITTEST_COMPILE_DEFINITIONS}
-    )
-  endif()
+
   if(library_deps)
     target_link_libraries(${target_name} PRIVATE ${library_deps})
   endif()


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D74397.249903.patch
Type: text/x-patch
Size: 2319 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libc-commits/attachments/20200312/e8f0fbcd/attachment.bin>


More information about the libc-commits mailing list