[LLVMdev] C library function declarations

Russell Wallace russell.wallace at gmail.com
Mon Jan 4 02:43:51 PST 2010


When implementing a language using LLVM as the backend, it is
necessary to give programs written in that language, access to the C
standard library functions. The Kaleidoscope tutorial shows how to do
this for individual functions using extern declarations, but in
general it would be necessary to have those predefined for the full
standard library. Presumably these would contain exactly the
information from the union of C header files. Is there a way, by
parsing the C header files or otherwise, to obtain this information in
the format LLVM expects?

As an extension of this question, it will be necessary to provide
access to other libraries written in C. The same question applies
there: Is there a way, by parsing C header files or otherwise, to
obtain a list of functions that are defined in a given library, in the
format LLVM expects?



More information about the llvm-dev mailing list