Ignore:
Timestamp:
May 4, 2018, 11:01:48 AM (6 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, with_gc
Children:
7d0a3ba
Parents:
f3152ab
Message:

Mangle function pointers the same as functions to prevent function/function-pointer overloading

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/Mangler.cc

    rf3152ab r3f024c9  
    179179                        void Mangler::postvisit( PointerType * pointerType ) {
    180180                                printQualifiers( pointerType );
    181                                 mangleName << "P";
     181                                // mangle void (*f)() and void f() to the same name to prevent overloading on functions and function pointers
     182                                if ( ! dynamic_cast<FunctionType *>( pointerType->base ) ) mangleName << "P";
    182183                                maybeAccept( pointerType->base, *visitor );
    183184                        }
Note: See TracChangeset for help on using the changeset viewer.