Ignore:
Timestamp:
Sep 27, 2017, 5:31:02 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, deferred_resn, demangler, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, with_gc
Children:
549c006
Parents:
12914e9 (diff), fa16264 (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:software/cfa/cfa-cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/InitTweak.cc

    r12914e9 rea156ae  
    270270        }
    271271
     272        Type * getThisType( FunctionType * ftype ) {
     273                assertf( ftype, "getThisType: nullptr ftype" );
     274                ObjectDecl * thisParam = getThisParam( ftype );
     275                ReferenceType * refType = strict_dynamic_cast< ReferenceType * >( thisParam->type );
     276                return refType->base;
     277        }
     278
     279        ObjectDecl * getThisParam( FunctionType * ftype ) {
     280                assertf( ftype, "getThisParam: nullptr ftype" );
     281                auto & params = ftype->parameters;
     282                assertf( ! params.empty(), "getThisParam: ftype with 0 parameters: %s", toString( ftype ).c_str() );
     283                return strict_dynamic_cast< ObjectDecl * >( params.front() );
     284        }
     285
    272286        bool tryConstruct( DeclarationWithType * dwt ) {
    273287                ObjectDecl * objDecl = dynamic_cast< ObjectDecl * >( dwt );
Note: See TracChangeset for help on using the changeset viewer.