[LLVMdev] Opaque type usage to represent foreign types
Robert Zeh
robert.a.zeh at gmail.com
Sun May 18 11:24:12 PDT 2008
In my project I have a group of foreign types (C++ classes) that I
want to use, but don't want to represent as structs within LLVM. For
example, for each field in each C++ class I have a setter and getter
function that I'd like to use. The setters and getters are "extern C"
functions to avoid problems with C++'s name mangling.
After going over the documentation it seems like I can do this by
creating a unique opaque type for each C++ class to track types during
my compilation, and then resolving all of the opaque types to void*
Is this a reasonable approach?
Robert
More information about the llvm-dev
mailing list