[libc] Add a tool called WrapperGen.
authorSiva Chandra Reddy <sivachandra@google.com>
Wed, 29 Jul 2020 06:42:11 +0000 (23:42 -0700)
committerSiva Chandra Reddy <sivachandra@google.com>
Thu, 30 Jul 2020 23:07:26 +0000 (16:07 -0700)
commita32af8252fde237a3936c4f2f5bee1dfb0cf5ea8
tree6908d427f70b433e59f08aaea2786f5b0fd21d90
parent8dfb5d767e70dd862096c8872fd3e3bead99741d
[libc] Add a tool called WrapperGen.

This tool will be used to generate C wrappers for the C++ LLVM libc
implementations. This change does not hook this tool up to anything yet.
However, it can be useful for cases where one does not want to run the
objcopy step (to insert the C symbol in the object file) but can make use
of LTO to eliminate the cost of the additional wrapper call. This can be
relevant for certain downstream platforms. If this tool can benefit other
libc platforms in general, then it can be integrated into the build system
with options to use or not use the wrappers. An example of such a
platform is CUDA.

Reviewed By: abrachet

Differential Revision: https://reviews.llvm.org/D84848
libc/utils/CMakeLists.txt
libc/utils/LibcTableGenUtil/APIIndexer.cpp
libc/utils/LibcTableGenUtil/APIIndexer.h
libc/utils/tools/CMakeLists.txt [new file with mode: 0644]
libc/utils/tools/WrapperGen/CMakeLists.txt [new file with mode: 0644]
libc/utils/tools/WrapperGen/Main.cpp [new file with mode: 0644]