Changeset 7e003011


Ignore:
Timestamp:
Jun 5, 2017, 1:59:11 PM (8 years ago)
Author:
Thierry Delisle <tdelisle@…>
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:
7b13aeb
Parents:
b3c36f4
Message:

Some more unused argument removal, also removed some functions

Location:
src
Files:
12 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/CodeGenerator.cc

    rb3c36f4 r7e003011  
    267267        }
    268268
    269         void CodeGenerator::visit( TraitDecl * traitDecl ) {}
     269        void CodeGenerator::visit( __attribute__((unused)) TraitDecl * traitDecl ) {}
    270270
    271271        void CodeGenerator::visit( TypedefDecl * typeDecl ) {
     
    328328        }
    329329
    330         void CodeGenerator::visit( ConstructorInit * init ){
     330        void CodeGenerator::visit( __attribute__((unused)) ConstructorInit * init ){
    331331                assertf( ! genC, "ConstructorInit nodes should not reach code generation." );
    332332                // xxx - generate something reasonable for constructor/destructor pairs
     
    962962        }
    963963
    964         void CodeGenerator::visit( NullStmt * nullStmt ) {
     964        void CodeGenerator::visit( __attribute__((unused)) NullStmt * nullStmt ) {
    965965                //output << indent << CodeGenerator::printLabels( nullStmt->get_labels() );
    966966                output << "/* null statement */ ;";
  • src/GenPoly/Box.cc

    rb3c36f4 r7e003011  
    103103                        void passTypeVars( ApplicationExpr *appExpr, Type *polyRetType, std::list< Expression *>::iterator &arg, const TyVarMap &exprTyVars );
    104104                        /// wraps a function application with a new temporary for the out-parameter return value
    105                         Expression *addRetParam( ApplicationExpr *appExpr, FunctionType *function, Type *retType, std::list< Expression *>::iterator &arg );
     105                        Expression *addRetParam( ApplicationExpr *appExpr, Type *retType, std::list< Expression *>::iterator &arg );
    106106                        /// Replaces all the type parameters of a generic type with their concrete equivalents under the current environment
    107107                        void replaceParametersWithConcrete( ApplicationExpr *appExpr, std::list< Expression* >& params );
     
    136136                  public:
    137137                        template< typename DeclClass >
    138                         DeclClass *handleDecl( DeclClass *decl, Type *type );
     138                        DeclClass *handleDecl( DeclClass *decl );
    139139                        template< typename AggDecl >
    140140                        AggDecl * handleAggDecl( AggDecl * aggDecl );
     
    665665                }
    666666
    667                 Expression *Pass1::addRetParam( ApplicationExpr *appExpr, FunctionType *function, Type *retType, std::list< Expression *>::iterator &arg ) {
     667                Expression *Pass1::addRetParam( ApplicationExpr *appExpr, Type *retType, std::list< Expression *>::iterator &arg ) {
    668668                        // Create temporary to hold return value of polymorphic function and produce that temporary as a result
    669669                        // using a comma expression.
     
    732732                        Type *concrete = replaceWithConcrete( appExpr, dynType );
    733733                        // add out-parameter for return value
    734                         return addRetParam( appExpr, function, concrete, arg );
     734                        return addRetParam( appExpr, concrete, arg );
    735735                }
    736736
     
    739739//                      if ( ! function->get_returnVals().empty() && isPolyType( function->get_returnVals().front()->get_type(), tyVars ) ) {
    740740                        if ( isDynRet( function, tyVars ) ) {
    741                                 ret = addRetParam( appExpr, function, function->get_returnVals().front()->get_type(), arg );
     741                                ret = addRetParam( appExpr, function->get_returnVals().front()->get_type(), arg );
    742742                        } // if
    743743                        std::string mangleName = mangleAdapterName( function, tyVars );
     
    12821282
    12831283                template< typename DeclClass >
    1284                 DeclClass * Pass2::handleDecl( DeclClass *decl, Type *type ) {
     1284                DeclClass * Pass2::handleDecl( DeclClass *decl ) {
    12851285                        DeclClass *ret = static_cast< DeclClass *>( Parent::mutate( decl ) );
    12861286
     
    12961296
    12971297                DeclarationWithType * Pass2::mutate( FunctionDecl *functionDecl ) {
    1298                         functionDecl = safe_dynamic_cast< FunctionDecl * > ( handleDecl( functionDecl, functionDecl->get_functionType() ) );
     1298                        functionDecl = safe_dynamic_cast< FunctionDecl * > ( handleDecl( functionDecl ) );
    12991299                        FunctionType * ftype = functionDecl->get_functionType();
    13001300                        if ( ! ftype->get_returnVals().empty() && functionDecl->get_statements() ) {
     
    13211321
    13221322                ObjectDecl * Pass2::mutate( ObjectDecl *objectDecl ) {
    1323                         return handleDecl( objectDecl, objectDecl->get_type() );
     1323                        return handleDecl( objectDecl );
    13241324                }
    13251325
     
    13441344                        addToTyVarMap( typeDecl, scopeTyVars );
    13451345                        if ( typeDecl->get_base() ) {
    1346                                 return handleDecl( typeDecl, typeDecl->get_base() );
     1346                                return handleDecl( typeDecl );
    13471347                        } else {
    13481348                                return Parent::mutate( typeDecl );
     
    13511351
    13521352                TypedefDecl * Pass2::mutate( TypedefDecl *typedefDecl ) {
    1353                         return handleDecl( typedefDecl, typedefDecl->get_base() );
     1353                        return handleDecl( typedefDecl );
    13541354                }
    13551355
  • src/InitTweak/FixGlobalInit.cc

    rb3c36f4 r7e003011  
    129129
    130130        // only modify global variables
    131         void GlobalFixer::visit( FunctionDecl *functionDecl ) {}
    132         void GlobalFixer::visit( StructDecl *aggregateDecl ) {}
    133         void GlobalFixer::visit( UnionDecl *aggregateDecl ) {}
    134         void GlobalFixer::visit( EnumDecl *aggregateDecl ) {}
    135         void GlobalFixer::visit( TraitDecl *aggregateDecl ) {}
    136         void GlobalFixer::visit( TypeDecl *typeDecl ) {}
     131        void GlobalFixer::visit( __attribute__((unused)) FunctionDecl *functionDecl ) {}
     132        void GlobalFixer::visit( __attribute__((unused)) StructDecl *aggregateDecl ) {}
     133        void GlobalFixer::visit( __attribute__((unused)) UnionDecl *aggregateDecl ) {}
     134        void GlobalFixer::visit( __attribute__((unused)) EnumDecl *aggregateDecl ) {}
     135        void GlobalFixer::visit( __attribute__((unused)) TraitDecl *aggregateDecl ) {}
     136        void GlobalFixer::visit( __attribute__((unused)) TypeDecl *typeDecl ) {}
    137137
    138138} // namespace InitTweak
  • src/InitTweak/FixInit.cc

    rb3c36f4 r7e003011  
    110110
    111111                        // don't go into other functions
    112                         virtual void visit( FunctionDecl *decl ) override {}
     112                        virtual void visit( __attribute__((unused)) FunctionDecl *decl ) override {}
    113113
    114114                  protected:
  • src/InitTweak/InitTweak.cc

    rb3c36f4 r7e003011  
    9292                InitImpl( Initializer * init ) : init( init ) {}
    9393
    94                 virtual std::list< Expression * > next( std::list< Expression * > & indices ) {
     94                virtual std::list< Expression * > next( __attribute((unused)) std::list< Expression * > & indices ) {
    9595                        // this is wrong, but just a placeholder for now
    9696                        // if ( ! flattened ) flatten( indices );
     
    248248        }
    249249
    250         Statement * ExprImpl::buildListInit( UntypedExpr * dst, std::list< Expression * > & indices ) {
     250        Statement * ExprImpl::buildListInit( __attribute((unused)) UntypedExpr * dst, __attribute((unused)) std::list< Expression * > & indices ) {
    251251                return NULL;
    252252        }
     
    475475                ConstExprChecker() : isConstExpr( true ) {}
    476476
    477                 virtual void visit( ApplicationExpr *applicationExpr ) { isConstExpr = false; }
    478                 virtual void visit( UntypedExpr *untypedExpr ) { isConstExpr = false; }
     477                virtual void visit( __attribute((unused)) ApplicationExpr *applicationExpr ) { isConstExpr = false; }
     478                virtual void visit( __attribute((unused)) UntypedExpr *untypedExpr ) { isConstExpr = false; }
    479479                virtual void visit( NameExpr *nameExpr ) {
    480480                        // xxx - temporary hack, because 0 and 1 really should be constexprs, even though they technically aren't in Cforall today
     
    487487                        if ( ! dynamic_cast< NameExpr * >( arg) && ! dynamic_cast< VariableExpr * >( arg ) && ! dynamic_cast< MemberExpr * >( arg ) && ! dynamic_cast< UntypedMemberExpr * >( arg ) ) isConstExpr = false;
    488488                }
    489                 virtual void visit( LabelAddressExpr *labAddressExpr ) { isConstExpr = false; }
    490                 virtual void visit( UntypedMemberExpr *memberExpr ) { isConstExpr = false; }
    491                 virtual void visit( MemberExpr *memberExpr ) { isConstExpr = false; }
    492                 virtual void visit( VariableExpr *variableExpr ) { isConstExpr = false; }
     489                virtual void visit( __attribute((unused)) LabelAddressExpr *labAddressExpr ) { isConstExpr = false; }
     490                virtual void visit( __attribute((unused)) UntypedMemberExpr *memberExpr ) { isConstExpr = false; }
     491                virtual void visit( __attribute((unused)) MemberExpr *memberExpr ) { isConstExpr = false; }
     492                virtual void visit( __attribute((unused)) VariableExpr *variableExpr ) { isConstExpr = false; }
    493493                // these might be okay?
    494494                // virtual void visit( SizeofExpr *sizeofExpr );
     
    501501                // virtual void visit( LogicalExpr *logicalExpr );
    502502                // virtual void visit( ConditionalExpr *conditionalExpr );
    503                 virtual void visit( TypeExpr *typeExpr ) { isConstExpr = false; }
    504                 virtual void visit( AsmExpr *asmExpr ) { isConstExpr = false; }
    505                 virtual void visit( UntypedValofExpr *valofExpr ) { isConstExpr = false; }
    506                 virtual void visit( CompoundLiteralExpr *compLitExpr ) { isConstExpr = false; }
    507                 virtual void visit( UntypedTupleExpr *tupleExpr ) { isConstExpr = false; }
    508                 virtual void visit( TupleExpr *tupleExpr ) { isConstExpr = false; }
    509                 virtual void visit( TupleAssignExpr *tupleExpr ) { isConstExpr = false; }
     503                virtual void visit( __attribute((unused)) TypeExpr *typeExpr ) { isConstExpr = false; }
     504                virtual void visit( __attribute((unused)) AsmExpr *asmExpr ) { isConstExpr = false; }
     505                virtual void visit( __attribute((unused)) UntypedValofExpr *valofExpr ) { isConstExpr = false; }
     506                virtual void visit( __attribute((unused)) CompoundLiteralExpr *compLitExpr ) { isConstExpr = false; }
     507                virtual void visit( __attribute((unused)) UntypedTupleExpr *tupleExpr ) { isConstExpr = false; }
     508                virtual void visit( __attribute((unused)) TupleExpr *tupleExpr ) { isConstExpr = false; }
     509                virtual void visit( __attribute((unused)) TupleAssignExpr *tupleExpr ) { isConstExpr = false; }
    510510
    511511                bool isConstExpr;
  • src/ResolvExpr/CommonType.cc

    rb3c36f4 r7e003011  
    4343
    4444                void getCommonWithVoidPointer( PointerType* voidPointer, PointerType* otherPointer );
    45                 template< typename RefType > void handleRefType( RefType *inst, Type *other );
    4645
    4746                Type *result;
     
    126125        }
    127126
    128         void CommonType::visit( VoidType *voidType ) {
    129         }
     127        void CommonType::visit( __attribute((unused)) VoidType *voidType ) {}
    130128
    131129        void CommonType::visit( BasicType *basicType ) {
     
    189187        }
    190188
    191         void CommonType::visit( ArrayType *arrayType ) {
    192         }
    193 
    194         void CommonType::visit( FunctionType *functionType ) {
    195         }
    196 
    197         template< typename RefType > void CommonType::handleRefType( RefType *inst, Type *other ) {
    198         }
    199 
    200         void CommonType::visit( StructInstType *aggregateUseType ) {
    201         }
    202 
    203         void CommonType::visit( UnionInstType *aggregateUseType ) {
    204         }
     189        void CommonType::visit( __attribute((unused)) ArrayType *arrayType ) {}
     190        void CommonType::visit( __attribute((unused)) FunctionType *functionType ) {}
     191        void CommonType::visit( __attribute((unused)) StructInstType *aggregateUseType ) {}
     192        void CommonType::visit( __attribute((unused)) UnionInstType *aggregateUseType ) {}
    205193
    206194        void CommonType::visit( EnumInstType *enumInstType ) {
     
    214202        }
    215203
    216         void CommonType::visit( TraitInstType *aggregateUseType ) {
     204        void CommonType::visit( __attribute((unused)) TraitInstType *aggregateUseType ) {
    217205        }
    218206
     
    239227        }
    240228
    241         void CommonType::visit( TupleType *tupleType ) {
    242         }
    243 
    244         void CommonType::visit( VarArgsType *varArgsType ) {
    245         }
     229        void CommonType::visit( __attribute((unused)) TupleType *tupleType ) {}
     230        void CommonType::visit( __attribute((unused)) VarArgsType *varArgsType ) {}
    246231
    247232        void CommonType::visit( ZeroType *zeroType ) {
  • src/ResolvExpr/ConversionCost.cc

    rb3c36f4 r7e003011  
    149149        };
    150150
    151         void ConversionCost::visit(VoidType *voidType) {
     151        void ConversionCost::visit( __attribute((unused)) VoidType *voidType ) {
    152152                cost = Cost::infinity;
    153153        }
     
    186186        }
    187187
    188         void ConversionCost::visit(ArrayType *arrayType) {
    189         }
    190 
    191         void ConversionCost::visit(FunctionType *functionType) {
    192         }
     188        void ConversionCost::visit(__attribute((unused)) ArrayType *arrayType) {}
     189        void ConversionCost::visit(__attribute((unused)) FunctionType *functionType) {}
    193190
    194191        void ConversionCost::visit(StructInstType *inst) {
     
    208205        }
    209206
    210         void ConversionCost::visit(EnumInstType *inst) {
     207        void ConversionCost::visit( __attribute((unused)) EnumInstType *inst ) {
    211208                static Type::Qualifiers q;
    212209                static BasicType integer( q, BasicType::SignedInt );
     
    217214        }
    218215
    219         void ConversionCost::visit(TraitInstType *inst) {
     216        void ConversionCost::visit( __attribute((unused)) TraitInstType *inst) {
    220217        }
    221218
     
    239236        }
    240237
    241         void ConversionCost::visit(TupleType *tupleType) {
     238        void ConversionCost::visit( __attribute((unused)) TupleType *tupleType) {
    242239                Cost c;
    243240                if ( TupleType *destAsTuple = dynamic_cast< TupleType* >( dest ) ) {
     
    259256        }
    260257
    261         void ConversionCost::visit(VarArgsType *varArgsType) {
     258        void ConversionCost::visit( __attribute((unused)) VarArgsType *varArgsType) {
    262259                if ( dynamic_cast< VarArgsType* >( dest ) ) {
    263260                        cost = Cost::zero;
     
    265262        }
    266263
    267         void ConversionCost::visit(ZeroType *zeroType) {
     264        void ConversionCost::visit( __attribute((unused)) ZeroType *zeroType) {
    268265                if ( dynamic_cast< ZeroType* >( dest ) ) {
    269266                        cost = Cost::zero;
     
    281278        }
    282279
    283         void ConversionCost::visit(OneType *oneType) {
     280        void ConversionCost::visit( __attribute((unused)) OneType *oneType) {
    284281                if ( dynamic_cast< OneType* >( dest ) ) {
    285282                        cost = Cost::zero;
  • src/ResolvExpr/PtrsAssignable.cc

    rb3c36f4 r7e003011  
    6363        }
    6464
    65         PtrsAssignable::PtrsAssignable( Type *dest, const TypeEnvironment &env ) : dest( dest ), result( 0 ), env( env ) {
    66         }
     65        PtrsAssignable::PtrsAssignable( Type *dest, const TypeEnvironment &env ) : dest( dest ), result( 0 ), env( env ) {}
    6766
    68         void PtrsAssignable::visit( VoidType *voidType ) {
     67        void PtrsAssignable::visit( __attribute((unused)) VoidType *voidType ) {
    6968                if ( dynamic_cast< FunctionType* >( dest ) ) {
    7069                        result = 0;
     
    7473        }
    7574
    76         void PtrsAssignable::visit( BasicType *basicType ) {
    77         }
    78 
    79         void PtrsAssignable::visit( PointerType *pointerType ) {
    80         }
    81 
    82         void PtrsAssignable::visit( ArrayType *arrayType ) {
    83         }
    84 
    85         void PtrsAssignable::visit( FunctionType *functionType ) {
     75        void PtrsAssignable::visit( __attribute__((unused)) BasicType *basicType ) {}
     76        void PtrsAssignable::visit( __attribute__((unused)) PointerType *pointerType ) {}
     77        void PtrsAssignable::visit( __attribute__((unused)) ArrayType *arrayType ) {}
     78        void PtrsAssignable::visit( __attribute__((unused)) FunctionType *functionType ) {
    8679                result = -1;
    8780        }
    8881
    89         void PtrsAssignable::visit( StructInstType *inst ) {
    90                 // I don't think we should be doing anything here, but I'm willing to admit that I might be wrong
    91         }
    92 
    93         void PtrsAssignable::visit( UnionInstType *inst ) {
    94                 // I don't think we should be doing anything here, but I'm willing to admit that I might be wrong
    95         }
     82        void PtrsAssignable::visit(  __attribute__((unused)) StructInstType *inst ) {}
     83        void PtrsAssignable::visit(  __attribute__((unused)) UnionInstType *inst ) {}
    9684
    9785        void PtrsAssignable::visit( EnumInstType *inst ) {
     
    10391        }
    10492
    105         void PtrsAssignable::visit( TraitInstType *inst ) {
    106                 // I definitely don't think we should be doing anything here
    107         }
    108 
     93        void PtrsAssignable::visit(  __attribute__((unused)) TraitInstType *inst ) {}
    10994        void PtrsAssignable::visit( TypeInstType *inst ) {
    11095                EqvClass eqvClass;
     
    116101        }
    117102
    118         void PtrsAssignable::visit( TupleType *tupleType ) {
    119 ///  // This code doesn't belong here, but it might be useful somewhere else
    120 ///   if ( TupleType *destAsTuple = dynamic_cast< TupleType* >( dest ) ) {
    121 ///     int ret = 0;
    122 ///     std::list< Type* >::const_iterator srcIt = tupleType->get_types().begin();
    123 ///     std::list< Type* >::const_iterator destIt = destAsTuple->get_types().begin();
    124 ///     while ( srcIt != tupleType->get_types().end() && destIt != destAsTuple->get_types().end() ) {
    125 ///       int assignResult = ptrsAssignable( *srcIt++, *destIt++ );
    126 ///       if ( assignResult == 0 ) {
    127 ///         result = assignResult;
    128 ///         return;
    129 ///       } else if ( assignResult < 0 ) {
    130 ///         ret = -1;
    131 ///       } else if ( ret > 0 ) {
    132 ///         ret += assignResult;
    133 ///       }
    134 ///     }
    135 ///     if ( srcIt == tupleType->get_types().end() && destIt == destAsTuple->get_types().end() ) {
    136 ///       result = ret;
    137 ///     } else {
    138 ///       result = 0;
    139 ///     }
    140 ///   }
    141         }
    142 
    143         void PtrsAssignable::visit( VarArgsType *varArgsType ) {
    144         }
    145 
    146         void PtrsAssignable::visit( ZeroType *zeroType ) {
    147         }
    148        
    149         void PtrsAssignable::visit( OneType *oneType ) {
    150         }
     103        void PtrsAssignable::visit(  __attribute__((unused)) TupleType *tupleType ) {}
     104        void PtrsAssignable::visit(  __attribute__((unused)) VarArgsType *varArgsType ) {}
     105        void PtrsAssignable::visit(  __attribute__((unused)) ZeroType *zeroType ) {}
     106        void PtrsAssignable::visit(  __attribute__((unused)) OneType *oneType ) {}
    151107       
    152108} // namespace ResolvExpr
  • src/ResolvExpr/PtrsCastable.cc

    rb3c36f4 r7e003011  
    9292        }
    9393
    94         void PtrsCastable::visit(VoidType *voidType) {
     94        void PtrsCastable::visit( __attribute__((unused)) VoidType *voidType) {
    9595                result = objectCast( dest, env, indexer );
    9696        }
    9797
    98         void PtrsCastable::visit(BasicType *basicType) {
     98        void PtrsCastable::visit( __attribute__((unused)) BasicType *basicType) {
    9999                result = objectCast( dest, env, indexer );
    100100        }
    101101
    102         void PtrsCastable::visit(PointerType *pointerType) {
     102        void PtrsCastable::visit( __attribute__((unused)) PointerType *pointerType) {
    103103                result = objectCast( dest, env, indexer );
    104104        }
    105105
    106         void PtrsCastable::visit(ArrayType *arrayType) {
     106        void PtrsCastable::visit( __attribute__((unused)) ArrayType *arrayType) {
    107107                result = objectCast( dest, env, indexer );
    108108        }
    109109
    110         void PtrsCastable::visit(FunctionType *functionType) {
     110        void PtrsCastable::visit( __attribute__((unused)) FunctionType *functionType) {
    111111                // result = -1;
    112112                result = functionCast( dest, env, indexer );
    113113        }
    114114
    115         void PtrsCastable::visit(StructInstType *inst) {
     115        void PtrsCastable::visit( __attribute__((unused)) StructInstType *inst) {
    116116                result = objectCast( dest, env, indexer );
    117117        }
    118118
    119         void PtrsCastable::visit(UnionInstType *inst) {
     119        void PtrsCastable::visit( __attribute__((unused)) UnionInstType *inst) {
    120120                result = objectCast( dest, env, indexer );
    121121        }
    122122
    123         void PtrsCastable::visit(EnumInstType *inst) {
     123        void PtrsCastable::visit( __attribute__((unused)) EnumInstType *inst) {
    124124                if ( dynamic_cast< EnumInstType* >( dest ) ) {
    125125                        result = 1;
     
    144144        }
    145145
    146         void PtrsCastable::visit(TupleType *tupleType) {
     146        void PtrsCastable::visit( __attribute__((unused)) TupleType *tupleType) {
    147147                result = objectCast( dest, env, indexer );
    148148        }
    149149
    150         void PtrsCastable::visit(VarArgsType *varArgsType) {
     150        void PtrsCastable::visit( __attribute__((unused)) VarArgsType *varArgsType) {
    151151                result = objectCast( dest, env, indexer );
    152152        }
    153153
    154         void PtrsCastable::visit(ZeroType *zeroType) {
     154        void PtrsCastable::visit( __attribute__((unused)) ZeroType *zeroType) {
    155155                result = objectCast( dest, env, indexer );
    156156        }
    157157
    158         void PtrsCastable::visit(OneType *oneType) {
     158        void PtrsCastable::visit( __attribute__((unused)) OneType *oneType) {
    159159                result = objectCast( dest, env, indexer );
    160160        }
  • src/ResolvExpr/TypeMap.h

    rb3c36f4 r7e003011  
    110110                        }
    111111
    112                         virtual void visit( VoidType *voidType ) {
     112                        virtual void visit( __attribute__((unused)) VoidType *voidType ) {
    113113                                findAndReplace( typeMap.voidValue );
    114114                        }
     
    138138                        }
    139139
    140                         virtual void visit( FunctionType *functionType ) {
     140                        virtual void visit( __attribute__((unused)) FunctionType *functionType ) {
    141141                                findAndReplace( typeMap.functionPointerValue );
    142142                        }
  • src/ResolvExpr/typeops.h

    rb3c36f4 r7e003011  
    132132        }
    133133
    134         template< typename Container1, typename Container2 >
    135         bool typesCompatibleList( Container1 &c1, Container2 &c2, const SymTab::Indexer &indexer, const TypeEnvironment &env ) {
    136                 typename Container1::iterator i1 = c1.begin();
    137                 typename Container2::iterator i2 = c2.begin();
    138                 for ( ; i1 != c1.end() && i2 != c2.end(); ++i1, ++i2 ) {
    139                         if ( ! typesCompatible( *i1, *i2, indexer ) ) {
    140                                 return false;
    141                         } // if
    142                 }
    143                 return ( i1 == c1.end() ) && ( i2 == c2.end() );
    144         }
    145 
    146134        /// creates the type represented by the list of returnVals in a FunctionType. The caller owns the return value.
    147135        Type * extractResultType( FunctionType * functionType );
  • src/SymTab/ImplementationType.cc

    rb3c36f4 r7e003011  
    6161        }
    6262
    63         void ImplementationType::visit(VoidType *voidType) {
    64         }
    65 
    66         void ImplementationType::visit(BasicType *basicType) {
    67         }
     63        void ImplementationType::visit( __attribute__((unused)) VoidType *voidType ) {}
     64        void ImplementationType::visit( __attribute__((unused)) BasicType *basicType ) {}
    6865
    6966        void ImplementationType::visit(PointerType *pointerType) {
     
    8986        }
    9087
    91         void ImplementationType::visit(StructInstType *aggregateUseType) {
    92         }
    93 
    94         void ImplementationType::visit(UnionInstType *aggregateUseType) {
    95         }
    96 
    97         void ImplementationType::visit(EnumInstType *aggregateUseType) {
    98         }
    99 
    100         void ImplementationType::visit(TraitInstType *aggregateUseType) {
    101         }
     88        void ImplementationType::visit( __attribute__((unused)) StructInstType * aggregateUseType ) {}
     89        void ImplementationType::visit( __attribute__((unused)) UnionInstType * aggregateUseType ) {}
     90        void ImplementationType::visit( __attribute__((unused)) EnumInstType * aggregateUseType ) {}
     91        void ImplementationType::visit( __attribute__((unused)) TraitInstType * aggregateUseType ) {}
    10292
    10393        void ImplementationType::visit(TypeInstType *inst) {
     
    120110        }
    121111
    122         void ImplementationType::visit(VarArgsType *varArgsType) {
    123         }
    124 
    125         void ImplementationType::visit(ZeroType *zeroType) {
    126         }
    127 
    128         void ImplementationType::visit(OneType *oneType) {
    129         }
     112        void ImplementationType::visit( __attribute__((unused)) VarArgsType *varArgsType ) {}
     113        void ImplementationType::visit( __attribute__((unused)) ZeroType *zeroType ) {}
     114        void ImplementationType::visit( __attribute__((unused)) OneType *oneType ) {}
    130115} // namespace SymTab
    131116
Note: See TracChangeset for help on using the changeset viewer.