[cfe-dev] Codegen structures

John McCall rjmccall at apple.com
Mon Apr 16 10:33:07 PDT 2012

On Apr 14, 2012, at 11:50 PM, Михаил wrote:
> Where exactly does insertion of RecordTypes (CXXRecort for example) appear during CodeGen? 

ConvertRecordDeclType in CodeGenTypes.cpp.

> I founded  "void CodeGenFunction::EmitDecl(const Decl &D)" , but there has been written that such Decl (CXXRecord) doesn't requires codegen support. But as I think it should be a place where declaration of types are inserted into IR.

We emit types into IR lazily so that we don't emit (and lay out) thousands of structure types that are never used in the program.


More information about the cfe-dev mailing list