[LLVMdev] [PATCH] - Union types, attempt 2
Talin
viridia at gmail.com
Thu Jan 14 22:29:03 PST 2010
On Thu, Jan 14, 2010 at 10:08 PM, me22 <me22.ca at gmail.com> wrote:
> 2010/1/15 Talin <viridia at gmail.com>:
> > On Thu, Jan 14, 2010 at 9:25 PM, me22 <me22.ca at gmail.com> wrote:
> >>
> >> @foo = constant union { float, i32 } insertvalue union { i32,
> >> float } undef, i32 4, 0
> >> @bar = constant union { i32, float } insertvalue union { float,
> >> i32 } undef, i32 4, 1
> >>
> >
> > Well, the fact that union members have to be indexed by number means that
> > the ordering has to be part of the type.
> >
>
> Does that mean that my example above is ill-formed, since the
> insertvalue gives a different type than the constant wants?
>
Yes.
--
-- Talin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20100114/82bcddeb/attachment.html>
More information about the llvm-dev
mailing list