[LLVMdev] Union type, is it really used or necessary?

Neal N. Wang neal.wang at gmail.com
Tue Jul 20 00:41:39 PDT 2010


In the LLVM type system, union type is similar to the one in C/C++. In the
implementation of llvm-gcc, a C union type is converted to a struct of one
field that can hold all possible values of the union type and type casts are
used to make the code manipulating the union type "well typed". This
approach seems work very well, is there really a need to keep union type in
LLVM? Is there a front-end emitting union type?

Thanks,
Neal
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100720/37dd3645/attachment.html>


More information about the llvm-dev mailing list