Ignore:
Timestamp:
Jun 8, 2015, 8:56:35 PM (6 years ago)
Author:
Peter A. Buhr <pabuhr@…>
Branches:
aaron-thesis, arm-eh, cleanup-dtors, ctor, deferred_resn, demangler, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, resolv-new, string, with_gc
Children:
81419b5
Parents:
cd623a4
Message:

fix constant types, remove unnecessary string copying, work on regression testing, fix several memory leaks

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/CodeGen/GenType.cc

    rcd623a4 r5f2f2d7  
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Peter A. Buhr
    12 // Last Modified On : Thu Jun  4 14:04:58 2015
    13 // Update Count     : 4
    14 //
    15 
    16 #include <strstream>
     12// Last Modified On : Mon Jun  8 14:36:02 2015
     13// Update Count     : 9
     14//
     15
     16#include <sstream>
    1717#include <cassert>
    1818
     
    6868
    6969        void GenType::genArray( const Type::Qualifiers &qualifiers, Type *base, Expression *dimension, bool isVarLen, bool isStatic ) {
    70                 std::ostrstream os;
     70                std::ostringstream os;
    7171                if ( typeString != "" ) {
    7272                        if ( typeString[ 0 ] == '*' ) {
     
    102102                os << "]";
    103103
    104                 typeString = std::string( os.str(), os.pcount() );
     104                typeString = os.str();
    105105 
    106106                base->accept( *this );
     
    127127
    128128        void GenType::visit( FunctionType *funcType ) {
    129                 std::ostrstream os;
     129                std::ostringstream os;
    130130
    131131                if ( typeString != "" ) {
     
    159159                } // if
    160160 
    161                 typeString = std::string( os.str(), os.pcount() );
     161                typeString = os.str();
    162162
    163163                if ( funcType->get_returnVals().size() == 0 ) {
Note: See TracChangeset for help on using the changeset viewer.