[cfe-dev] Get llvm::StructType* from C/C++ Code

Tyler Hardin tghardin1 at catamount.wcu.edu
Wed Oct 30 11:16:01 PDT 2013


I'm working on a compiler for a dynamically typed language in which the
runtime will be implemented as C++ functions. These C++ functions will use
a type hierarchy that will be specified as normal C POD structs. What I'd
like to be able to do, is use Clang to get the llvm::StructType* that would
correspond to the C POD structs to use in the codegen of my compiler so I
have guaranteed ABI consistency. That is, feed some library in Clang some C
struct as a string, and get the llvm::StructType* that Clang would use when
compiling instances of this struct. Is this possible?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20131030/0026562b/attachment.html>


More information about the cfe-dev mailing list