[libc-commits] [PATCH] D140078: [libc] Handle allocation failures in the dirent API gracefully.

Siva Chandra via Phabricator via libc-commits libc-commits at lists.llvm.org
Thu Dec 15 11:48:00 PST 2022


sivachandra added inline comments.


================
Comment at: libc/src/__support/CPP/CMakeLists.txt:105
+add_object_library(
+  new
+  SRCS
----------------
lntue wrote:
> Maybe change the name to `new_and_delete` or `new_delete`?
The target names here reflect the header file name. So, I am inclined to keep it as is for the sake of consistency.


================
Comment at: libc/src/__support/CPP/new.h:72
 
+void operator delete(void *) noexcept __asm__("__llvm_libc_delete");
+void operator delete(void *, std::align_val_t) noexcept
----------------
lntue wrote:
> Why are these `delete` operators defined differently compared to `new`?
Thanks for asking - I have added a comment now explaining that aspect.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140078



More information about the libc-commits mailing list