Ignore:
Timestamp:
Aug 25, 2017, 12:11:53 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:
bf7b9da7
Parents:
135b431 (diff), f676b84 (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/CodeGen/GenType.cc

    r135b431 r6b224a52  
    3737                virtual void visit( PointerType *pointerType );
    3838                virtual void visit( ArrayType *arrayType );
     39                virtual void visit( ReferenceType *refType );
    3940                virtual void visit( StructInstType *structInst );
    4041                virtual void visit( UnionInstType *unionInst );
     
    145146        void GenType::visit( ArrayType *arrayType ) {
    146147                genArray( arrayType->get_qualifiers(), arrayType->get_base(), arrayType->get_dimension(), arrayType->get_isVarLen(), arrayType->get_isStatic() );
     148        }
     149
     150        void GenType::visit( ReferenceType *refType ) {
     151                assert( refType->get_base() != 0);
     152                assertf( ! genC, "Reference types should not reach code generation." );
     153                handleQualifiers( refType );
     154                typeString = "&" + typeString;
     155                refType->get_base()->accept( *this );
    147156        }
    148157
     
    278287                        typeString = "_Atomic " + typeString;
    279288                } // if
     289                if ( type->get_lvalue() && ! genC ) {
     290                        // when not generating C code, print lvalue for debugging.
     291                        typeString = "lvalue " + typeString;
     292                }
    280293        }
    281294} // namespace CodeGen
Note: See TracChangeset for help on using the changeset viewer.