[libc-commits] [PATCH] D89267: Move Cannonical Function List
Siva Chandra via Phabricator via libc-commits
libc-commits at lists.llvm.org
Tue Oct 13 21:05:40 PDT 2020
sivachandra added inline comments.
================
Comment at: libc/utils/HdrGen/EntrypointsReader.cpp:51
+
+ if (!InSet && CurLine.startswith("set(")) {
+ InSet = true;
----------------
sivachandra wrote:
> This part of the code makes me nervous. Nothing wrong with you've got, but just that we are parsing a CMake file. We already "parse" the entrypoint list here: https://github.com/llvm/llvm-project/blob/master/libc/CMakeLists.txt#L76. So, technically we can just pass that list as a command line argument to hdrgen. I am not sure how portable that will be because of the command line length. Lets keep this for now. We can switch to command line args later if required.
I did some more digging and this is what I found: https://github.com/llvm/llvm-project/blob/master/libc/test/src/CMakeLists.txt#L31
Which is an existing example of passing the list of functions as command line arguments. So, we should probably do that and not use a custom parser like this.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D89267/new/
https://reviews.llvm.org/D89267
More information about the libc-commits
mailing list