assert in getCGRecordLayout

Hi!

If I do

codeGenTypes.getCGRecordLayout(recordDecl);

to get the layout of a struct (I derive from clang::CodeGenerator and
do it in HandleTopLevelDecl)
then getCGRecordLayout asserts if the recordDecl contains
an unknown type. Is there a possibility to find out if recordDecl
is valid? One solution could be that getCGRecordLayout returns
a pointer that can be NULL on failure.

-Jochen

Hi Jochen,

you might want to call CodeGenTypes::ConvertType on the type that the record decl corresponds to first.

- Anders

8 maj 2010 kl. 15.12 skrev Jochen Wilhelmy: