[PATCH] D79279: Add overloaded versions of builtin mem* functions

Guillaume Chatelet via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Jul 2 01:34:08 PDT 2020


gchatelet added inline comments.


================
Comment at: clang/include/clang/Basic/Builtins.def:489
 BUILTIN(__builtin_memcpy_inline, "vv*vC*Iz", "nt")
+BUILTIN(__builtin_overloaded_memcpy, "v*v*vC*z", "nt")
 BUILTIN(__builtin_memmove, "v*v*vC*z", "nF")
----------------
`overloaded` doesn't bring much semantic (says the one who added `__builtin_memcpy_inline`...). Can you come up with something that describes more precisely what the intends are?

Also `memset`, `memcmp`, `memcpy`, `memmove` will have their `inline` and `overloaded` versions. This is becoming a crowded space. It may be confusing in the long run. If we want to go in that direction maybe we should come up with a consistent pattern: `__builtin_<memfun>_<feature>`. WDYT?


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D79279





More information about the cfe-commits mailing list