Changeset 0a267c1 for src/InitTweak


Ignore:
Timestamp:
Oct 19, 2017, 11:13:12 AM (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:
18ca28e
Parents:
b4748db
git-author:
Rob Schluntz <rschlunt@…> (10/13/17 12:38:26)
git-committer:
Rob Schluntz <rschlunt@…> (10/19/17 11:13:12)
Message:

Refactor autogen for UnionDecl? and update 64-bit tests

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/InitTweak.cc

    rb4748db r0a267c1  
    578578        FunctionDecl * isCopyFunction( Declaration * decl, const std::string & fname ) {
    579579                FunctionDecl * function = dynamic_cast< FunctionDecl * >( decl );
    580                 if ( ! function ) return 0;
    581                 if ( function->get_name() != fname ) return 0;
    582                 FunctionType * ftype = function->get_functionType();
    583                 if ( ftype->get_parameters().size() != 2 ) return 0;
     580                if ( ! function ) return nullptr;
     581                if ( function->name != fname ) return nullptr;
     582                FunctionType * ftype = function->type;
     583                if ( ftype->parameters.size() != 2 ) return nullptr;
    584584
    585585                Type * t1 = getPointerBase( ftype->get_parameters().front()->get_type() );
    586                 Type * t2 = ftype->get_parameters().back()->get_type();
     586                Type * t2 = ftype->parameters.back()->get_type();
    587587                assert( t1 );
    588588
     
    604604        }
    605605        FunctionDecl * isDefaultConstructor( Declaration * decl ) {
    606                 if ( isConstructor( decl->get_name() ) ) {
     606                if ( isConstructor( decl->name ) ) {
    607607                        if ( FunctionDecl * func = dynamic_cast< FunctionDecl * >( decl ) ) {
    608                                 if ( func->get_functionType()->get_parameters().size() == 1 ) {
     608                                if ( func->type->parameters.size() == 1 ) {
    609609                                        return func;
    610610                                }
Note: See TracChangeset for help on using the changeset viewer.