[cfe-dev] CGRecordLayoutBuilder for MS ABI

r4start r4start at gmail.com
Tue Oct 25 07:27:34 PDT 2011


On 25/10/2011 01:16, Eli Friedman wrote:
> Given that you've added an assert that the vfptr is at the beginning
> of a class, I'm wondering we're doing primary base computations
> correctly; please add a testcase for something like following:
>
> struct A { int a; };
> struct B { int b; };
> struct C : virtual public A { int c; };
> struct D : public B, public C { virtual void f(); };
> D* x;
Good test, thnx. I found bug and fix it in patch.
> I'm not following why all the changes to the way we generate padding
> are necessary; they don't seem to have any useful effect.  (LLVM
> structs are not packed by default.)
I think this info is helpful at this stage of MS ABI implementing.
In future, when we will have MS ABI support(may be not full, but that 
works), this code can be easily removed.
But if you say that this is a waste code I'll delete it.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: ms_codegen.patch
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20111025/c68b870f/attachment.ksh>


More information about the cfe-dev mailing list