[cfe-commits] r77351 - in /cfe/trunk: lib/CodeGen/CGCXX.cpp lib/CodeGen/CGExpr.cpp test/CodeGenCXX/constructor-init.cpp

Fariborz Jahanian fjahanian at apple.com
Tue Jul 28 17:04:24 PDT 2009


On Jul 28, 2009, at 4:02 PM, Anders Carlsson wrote:

>
> On Jul 28, 2009, at 3:53 PM, Fariborz Jahanian wrote:
>>>
>> I don;t know at this time. Note that loop also computes index into  
>> the
>> Offset table for a given base class. So, it does other things.
>> In any case, I will make sure that this loop, in whatever form it  
>> will
>> be, will go into a static function.
>>
>> - fariborz
>
> We now have this information in the ASTRecordLayout -
>
> /// getBaseClassOffset - Get the offset, in bits, for the given base  
> class.
> uint64_t getBaseClassOffset(const CXXRecordDecl *Base) const;
>
> I imagined that AddressCXXOfBaseClass would know the the path of  
> base classes so it could just walk it and use getBaseClassOffset to  
> get the final offset. (This won't work if any of the base classes in  
> the hierarchy are virtual of course but let's not worry about that  
> right now :).

Great, thanks. Now I can do what Chris asked for.

- fariborz

>
>
> Anders




More information about the cfe-commits mailing list