Changeset 71bd8c6 for src/SymTab


Ignore:
Timestamp:
Jul 8, 2015, 4:47:08 PM (10 years ago)
Author:
Rob Schluntz <rschlunt@…>
Branches:
ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
Children:
e5609dd
Parents:
cc79d97
Message:

fix isVarLen in array types, fix loss of typedef when variable of aggregate type is declared, fix duplicate typedef with arrays of constant size

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SymTab/TypeEquality.cc

    rcc79d97 r71bd8c6  
    1010// Created On       : Tue Jul 07 16:28:29 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Wed Jul 08 13:41:53 2015
    13 // Update Count     : 34
     12// Last Modified On : Wed Jul 08 16:20:09 2015
     13// Update Count     : 35
    1414//
    1515
     
    102102                        }
    103103
     104                        if ( ! arrayType->get_isVarLen() && ! at->get_isVarLen() ) {
     105                                ConstantExpr * ce1 = dynamic_cast< ConstantExpr * >( arrayType->get_dimension() );
     106                                ConstantExpr * ce2 = dynamic_cast< ConstantExpr * >( at->get_dimension() );
     107                                assert(ce1 && ce2);
     108
     109                                Constant * c1 = ce1->get_constant();
     110                                Constant * c2 = ce2->get_constant();
     111
     112                                result = result && c1->get_value() == c2->get_value();
     113                        }
     114
    104115                        other = at->get_base();
    105116                        arrayType->get_base()->accept( *this );
Note: See TracChangeset for help on using the changeset viewer.