[libc-commits] [PATCH] D140574: [libc][NFC] Use operator delete to cleanup a File object.

Guillaume Chatelet via Phabricator via libc-commits libc-commits at lists.llvm.org
Wed Jan 4 01:56:23 PST 2023


gchatelet added inline comments.


================
Comment at: libc/src/__support/File/file.h:206
+  // file.
+  static constexpr int cleanup(File *f) {
+    int close_result = f->close();
----------------
sivachandra wrote:
> gchatelet wrote:
> > Marking this function `constexpr` breaks gcc compilation as it expects all function calls down this one to be `constexpr` as well (i.e., File->close(), ...)
> > 
> Fixed this now but it looks like we still have some way to go with similar cleanups to make it build with GCC: https://github.com/llvm/llvm-project/commit/fa715e2dad4adfe7f8922c299250b4463e1253c9
Absolutely, I'll send a few more fixes but we really need a GCC build bot to make it sustainable.


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D140574



More information about the libc-commits mailing list