Codegen structures

Where exactly does insertion of RecordTypes (CXXRecort for example) appear during CodeGen?

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.

Thanks.

Yours sincerely,
Kadysev Mikhail

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.

John.