[LLVMdev] is the SmallVector implementation standard c++?

Julio julio.martin.hidalgo at gmail.com
Thu Aug 28 15:32:26 PDT 2008

Hi, in simple-inheritance the base object is always allocated first, and
because of the union of double, long long, etc... the first element is
aligned, so the others will be contigous. It's a bit tricky but should work

2008/8/28 Rafael Espindola <espindola at google.com>

> While debugging a bootstrap problem, I noticed that SmallVector stores
> one element in SmallVectorImpl and N - 1 in SmallVector. It also
> assumes that all elements are continuous in memory. Does C++ makes any
> guaranties about the relative memory position of a base and parent
> classes?
> I haven't studied it a lot, maybe we can keep N elements in
> SmallVector and pass the pointer to SmallVectorImpl constructor?
> Cheers,
> --
> Rafael Avila de Espindola
> Google | Gordon House | Barrow Street | Dublin 4 | Ireland
> Registered in Dublin, Ireland | Registration Number: 368047
> _______________________________________________
> LLVM Developers mailing list
> LLVMdev at cs.uiuc.edu         http://llvm.cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvmdev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20080829/ce41fa1f/attachment.html>

More information about the llvm-dev mailing list