Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/SynTree/ObjectDecl.cc

    r1cbca6e r974906e2  
    55// file "LICENCE" distributed with Cforall.
    66//
    7 // ObjectDecl.cc -- 
     7// ObjectDecl.cc --
    88//
    99// Author           : Richard C. Bilson
    1010// Created On       : Mon May 18 07:44:20 2015
    1111// Last Modified By : Rob Schluntz
    12 // Last Modified On : Tue Sep 29 14:13:01 2015
    13 // Update Count     : 18
     12// Last Modified On : Fri Jan 08 15:29:10 2016
     13// Update Count     : 27
    1414//
    1515
     
    1919#include "Expression.h"
    2020#include "utility.h"
     21#include "Statement.h"
    2122
    2223ObjectDecl::ObjectDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Type linkage, Expression *bitfieldWidth, Type *type, Initializer *init, bool isInline, bool isNoreturn )
     
    2425        set_isInline( isInline );
    2526        set_isNoreturn( isNoreturn );
     27        set_ctor( NULL );
    2628}
    2729
    2830ObjectDecl::ObjectDecl( const ObjectDecl &other )
    29         : Parent( other ), type( maybeClone( other.type ) ), init( maybeClone( other.init ) ), bitfieldWidth( maybeClone( other.bitfieldWidth ) ) {
     31        : Parent( other ), type( maybeClone( other.type ) ), init( maybeClone( other.init ) ), bitfieldWidth( maybeClone( other.bitfieldWidth ) ), ctor( maybeClone( other.ctor ) ) {
    3032}
    3133
     
    3436        delete init;
    3537        delete bitfieldWidth;
     38        delete ctor;
    3639}
    3740
     
    5861                os << " with initializer ";
    5962                init->print( os, indent );
     63                os << std::string(indent, ' ') << "maybeConstructed? " << init->get_maybeConstructed();
    6064        } // if
    6165
     
    6468                bitfieldWidth->print( os );
    6569        } // if
     70
     71        if ( ctor ) {
     72                os << " initially constructed with ";
     73                ctor->print( os, indent );
     74        } // if
    6675}
    6776
     
    6978#if 0
    7079        if ( get_mangleName() != "") {
    71                 os << get_mangleName() << ": "; 
    72         } else 
     80                os << get_mangleName() << ": ";
     81        } else
    7382#endif
    7483        if ( get_name() != "" ) {
Note: See TracChangeset for help on using the changeset viewer.