Ignore:
Timestamp:
Jul 21, 2017, 3:57:11 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:
9191a8e
Parents:
53a8e68
Message:

Refactor operator predicates into OperatorTable?.cc

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/InitTweak/FixInit.cc

    r53a8e68 rbff227f  
    2626#include "FixGlobalInit.h"
    2727#include "CodeGen/GenType.h"  // for warning/error messages
     28#include "CodeGen/OperatorTable.h"
    2829#include "Common/PassVisitor.h"
    2930#include "GenPoly/DeclMutator.h"
     
    363364                                        FunctionType * ftype = dynamic_cast< FunctionType * >( GenPoly::getFunctionType( funcDecl->get_type() ) );
    364365                                        assert( ftype );
    365                                         if ( isConstructor( funcDecl->get_name() ) && ftype->get_parameters().size() == 2 ) {
     366                                        if ( CodeGen::isConstructor( funcDecl->get_name() ) && ftype->get_parameters().size() == 2 ) {
    366367                                                Type * t1 = getPointerBase( ftype->get_parameters().front()->get_type() );
    367368                                                Type * t2 = ftype->get_parameters().back()->get_type();
     
    372373                                                        return appExpr;
    373374                                                } // if
    374                                         } else if ( isDestructor( funcDecl->get_name() ) ) {
     375                                        } else if ( CodeGen::isDestructor( funcDecl->get_name() ) ) {
    375376                                                // correctness: never copy construct arguments to a destructor
    376377                                                return appExpr;
     
    975976                        if ( ! funcDecl ) return false;
    976977                        if ( ! funcDecl->get_statements() ) return false;
    977                         return isCtorDtor( funcDecl->get_name() ) && ! LinkageSpec::isOverridable( funcDecl->get_linkage() );
     978                        return CodeGen::isCtorDtor( funcDecl->get_name() ) && ! LinkageSpec::isOverridable( funcDecl->get_linkage() );
    978979                }
    979980
     
    992993
    993994                        function = funcDecl;
    994                         isCtor = isConstructor( function->get_name() );
     995                        isCtor = CodeGen::isConstructor( function->get_name() );
    995996                        if ( checkWarnings( function ) ) {
    996997                                FunctionType * type = function->get_functionType();
Note: See TracChangeset for help on using the changeset viewer.