model_server/xref/src/Xref_util.cxx
//   for a given file (module) that we are parsing or removing,
//  def_hp  is a full list of symbols that all are defined-in a file
//  this   is a particular symbol that    belongs-to a file
for a given file (module) that we are parsing or removing,
def_hp  is a full list of symbols that all are defined-in a file
this   is a particular symbol that    belongs-to a file
for a given file ( module ) that we are parsing or removing def_hp is a full list of symbols that all are defined - in a file this is a particular symbol that belongs - to a file
void xrefSymbol::remove_module_link(symbolSet & def_hp, Xref* xr)
{
    Initialize(xrefSymbol::remove_module_link);
    XrefTable* xrt = xr->get_lxref();
    uint sind = get_symbol_index();
    Link* lnk = get_start_link(sind, xrt);
    while (lnk && !last_link(lnk)) {
        if (link_type_converter::is_reverse_link(lnk->lt()) && type_has!=lnk->lt()) {
            xrefSymbol* dest = lnk->get_symbol_of_link(xrt);
            symbolPtr sym(xr,dest);	  
            if (def_hp.includes(sym)) {
                if (!remove_module_conservative_link(get_kind())
                    && !remove_module_conservative_link(dest->get_kind())) {
#ifdef _PSET_DEBUG_PRINT
                    print1_link("remv",this, lnk->lt, dest,xrt);                 
#endif
                    rm_link((linkType) lnk->lt(), dest, xrt);      
                }
            }
        }
#ifdef _PSET_DEBUG_PRINT
        is_consistent(0);
#endif
        lnk = get_next_link(lnk, sind, xrt);
    }
}
void xrefSymbol :: remove_module_link ( symbolSet & def_hp , Xref * xr ) { Initialize ( xrefSymbol :: remove_module_link ) ; XrefTable * xrt = xr -> get_lxref ( ) ; uint sind = get_symbol_index ( ) ; Link * lnk = get_start_link ( sind , xrt ) ; while ( lnk && ! last_link ( lnk ) ) { if ( link_type_converter :: is_reverse_link ( lnk -> lt ( ) ) && type_has != lnk -> lt ( ) ) { xrefSymbol * dest = lnk -> get_symbol_of_link ( xrt ) ; symbolPtr sym ( xr , dest ) ; if ( def_hp . includes ( sym ) ) { if ( ! remove_module_conservative_link ( get_kind ( ) ) && ! remove_module_conservative_link ( dest -> get_kind ( ) ) ) { #ifdef _PSET_DEBUG_PRINT print1_link ( " " , this , lnk -> lt , dest , xrt ) ; #endif rm_link ( ( linkType ) lnk -> lt ( ) , dest , xrt ) ; } } } #ifdef _PSET_DEBUG_PRINT is_consistent ( 0 ) ; #endif lnk = get_next_link ( lnk , sind , xrt ) ; } }
for a given file (module) that we are parsing or removing,
def_hp  is a full list of symbols that all are defined-in a file
this   is a particular symbol that    belongs-to a file
for a given file ( module ) that we are parsing or removing def_hp is a full list of symbols that all are defined - in a file this is a particular symbol that belongs - to a file
// example links: included_by, friends_of, ... // note:  type_has  is not removed, since it could be coming from other files, too //     besides, it appears that insert_module does not put it back in // we only remove links whose endpoints are not in the conservative list // ???  debug information only    REMOVE BEFORE PUTTING // remove both links //    else if (lnk->num_link()) //      rm_link((linkType) lnk->lt);