[libc-commits] [PATCH] D80291: [libc][NFC] Simplify memcpy implementation

Alex Brachet via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu May 21 14:38:48 PDT 2020


abrachet accepted this revision.
abrachet added inline comments.
This revision is now accepted and ready to land.


================
Comment at: libc/src/string/CMakeLists.txt:78
   add_implementation(memcpy ${memcpy_name}
-    SRCS ${LIBC_SOURCE_DIR}/src/string/memcpy.cpp
+    SRCS ${LIBC_SOURCE_DIR}/src/string/${LIBC_STRING_TARGET_FOLDER}/memcpy.cpp
     HDRS ${LIBC_SOURCE_DIR}/src/string/memcpy.h
----------------
While we're here maybe we could call this `LIBC_STRING_TARGET_DIR`?

But as a second thought maybe we just call this `LIBC_STRING_TARGET_ARCH`. There are already a few places where we don't care about x86/x86_64. For example in `memory_utils/CMakeLists.txt` we can use the data file as `cacheline_size_${LIBC_STRING_TARGET_ARCH}.h.inc` and not need two identical `cacheline_size` files.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D80291





More information about the libc-commits mailing list