Changeset 208e5be for src/SymTab


Ignore:
Timestamp:
Jul 5, 2017, 4:59:17 PM (7 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
Children:
5805d15
Parents:
b1e63ac5 (diff), 1ce2189 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'master' of plg.uwaterloo.ca:/u/cforall/software/cfa/cfa-cc into references

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Indexer.cc

    rb1e63ac5 r208e5be  
    653653                        for ( MangleTable::const_iterator decl = mangleTable.begin(); decl != mangleTable.end(); ++decl ) {
    654654                                // check for C decls with the same name, skipping those with a compatible type (by mangleName)
    655                                 if ( decl->second->get_linkage() == LinkageSpec::C && decl->first != mangleName ) return true;
     655                                if ( ! LinkageSpec::isMangled( decl->second->get_linkage() ) && decl->first != mangleName ) return true;
    656656                        }
    657657                }
     
    670670                                // check for C decls with the same name, skipping
    671671                                // those with an incompatible type (by mangleName)
    672                                 if ( decl->second->get_linkage() == LinkageSpec::C && decl->first == mangleName ) return true;
     672                                if ( ! LinkageSpec::isMangled( decl->second->get_linkage() ) && decl->first == mangleName ) return true;
    673673                        }
    674674                }
     
    725725                        // new definition shadows the autogenerated one, even at the same scope
    726726                        return false;
    727                 } else if ( added->get_linkage() != LinkageSpec::C || ResolvExpr::typesCompatible( added->get_type(), existing->get_type(), Indexer() ) ) {
     727                } else if ( LinkageSpec::isMangled( added->get_linkage() ) || ResolvExpr::typesCompatible( added->get_type(), existing->get_type(), Indexer() ) ) {
    728728                        // typesCompatible doesn't really do the right thing here. When checking compatibility of function types,
    729729                        // we should ignore outermost pointer qualifiers, except _Atomic?
     
    766766
    767767                // this ensures that no two declarations with the same unmangled name at the same scope both have C linkage
    768                 if ( decl->get_linkage() == LinkageSpec::C ) {
     768                if ( ! LinkageSpec::isMangled( decl->get_linkage() ) ) {
    769769                        // NOTE this is broken in Richard's original code in such a way that it never triggers (it
    770770                        // doesn't check decls that have the same manglename, and all C-linkage decls are defined to
Note: See TracChangeset for help on using the changeset viewer.