[cfe-dev] assert in getCGRecordLayout
Anders Carlsson
andersca at mac.com
Sat May 8 15:28:57 PDT 2010
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:
> 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
>
> _______________________________________________
> cfe-dev mailing list
> cfe-dev at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/cfe-dev
More information about the cfe-dev
mailing list