[libc-commits] [PATCH] D111584: [libc] add strdup implementation

Tue Ly via Phabricator via libc-commits libc-commits at lists.llvm.org
Mon Oct 18 08:17:14 PDT 2021


lntue added inline comments.


================
Comment at: libc/include/stdlib.h.def:17-22
+__BEGIN_C_DECLS
+  void* malloc(size_t);
+  void* calloc(size_t, size_t);
+  void* realloc(void*, size_t);
+  void free(void*);
+__END_C_DECLS
----------------
sivachandra wrote:
> michaelrj wrote:
> > This feels wrong, but I'm not sure how else to get these into the header
> This is a good find. Assuming that allocators are but one of the "external" functions that LLVM libc will provide, I think we should have a scalable solution for this. So, may be add a new cmake rule called `add_external_entrypoint` which does nothing but create a dummy target that can be listed in places like `entrypoints.txt`?
+1.  I wasn't able to find a better way, and was waiting for Siva for a better suggestion.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D111584



More information about the libc-commits mailing list