Advices needed for LLVM IR compilation

Hi,

Our compiler currently generates a C++ class. It defines a data structure and emit code to access member of this newly data structure at the same time: access code is compiled when the shape of the complete data structure is not yet known.

Can we keep the same scheme when targeting LLVM IR? Can we define a new structured type and compiled acces to fields in the same pass? Or do we need to restructure the compilation process in two separated steps?

Thanks

Stephane Letz