Esempio n. 1
0
static SYMBOL inlineSymbol(     // CREATE TRANSLATION SYMBOL IF REQ'D
    SYMBOL sym )                // - original symbol
{
    SYMBOL old;                 // - same as "sym"
    FN_CTL* fctl;               // - current file control

    fctl = FnCtlTop();
    if( sym == fctl->this_sym ) {
        return( sym );
    }
    if( sym == fctl->cdtor_sym ) {
        return( sym );
    }
    if(  CgBackInlinedDepth() > 0
      && ! SymIsFunction( sym )
      && ! SymIsStaticData( sym ) ) {
        old = sym;
        sym = push_inline_sym( old );
        SymTransPush( old, sym );
        // code used to only have SymIsCatchAlias so we
        // make sure SymIsAlias includes SymIsCatchAlias
        DbgAssert( ! SymIsCatchAlias( sym ) ||
                   ( SymIsCatchAlias( sym ) && SymIsAlias( sym ) ) );
        if( SymIsAlias( sym ) || SymIsAnonymousMember( sym ) ) {
            if( SymIsAutomatic( sym ) ) {
                sym->u.alias = SymTrans( sym->u.alias );
            }
        }
    }
    return( sym );
}
Esempio n. 2
0
cg_type CgReturnType(           // GET CG-TYPE FOR RETURN
    cg_type type )              // - code-gen type
{
    if( CompFlags.returns_promoted && 0 == CgBackInlinedDepth() ) {
        type = FEParmType( NULL, NULL, type );
    }
    return type;
}