[PATCH] D64939: Add a proposal for a libc project under the LLVM umbrella.

Fangrui Song via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue Aug 13 05:45:50 PDT 2019


MaskRay added inline comments.


================
Comment at: llvm/docs/Proposals/LLVMLibC.rst:29
+- Provide C symbols as specified by the standards, but take advantage
+  and use C++ language facilities for the core implementation.
+- Provides POSIX extensions on POSIX compliant platforms.
----------------
chandlerc wrote:
> MaskRay wrote:
> > Can you clarify a bit what features you really want from C++?
> > 
> > People have concerns that freestanding c++ language semantics are underspecified. My impression is that it may be useful in a few places, but in most places C will just be a better choice.
> It's not clear that trying to split this hair *even more* finely is really useful in the absence of code.
> 
> I think if people can effectively leverage C++ language features when implementing runtime libraries, they should. And I don't think we need to try to preclude that before even seeing the usage.
> 
> LLVM's libunwind, libc++abi, the sanitizer runtimes, all have benefited from some limited use of C++ language features. Not sure what more evidence is really needed here...
I think "compatible types" in C can be very useful to layering it on the system libc. When C++ fits, sure using it will be nice. I am just worried C is precluded from the core implementation. Many functions do not share states and they benefit little from using C++. I hope these are not disallowed from using C.

(Does core implementation mean things like: network,pthread,stdio,regex,locale?)


Repository:
  rG LLVM Github Monorepo

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

https://reviews.llvm.org/D64939





More information about the llvm-commits mailing list