Changeset a5f0529 for src/SynTree/Expression.cc
- Timestamp:
- Jul 26, 2017, 2:44:09 PM (7 years ago)
- 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:
- 2edd80ae
- Parents:
- b947fb2
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Expression.cc
rb947fb2 ra5f0529 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : T hu Mar 30 16:41:13201713 // Update Count : 5 212 // Last Modified On : Tue Jul 25 14:15:47 2017 13 // Update Count : 54 14 14 // 15 15 … … 298 298 if ( result->isVoid() ) { 299 299 os << "nothing"; 300 } else { 301 result->print( os, indent+2 ); 302 } // if 303 os << std::endl; 304 Expression::print( os, indent ); 305 } 306 307 VirtualCastExpr::VirtualCastExpr( Expression *arg_, Type *toType ) : Expression(), arg(arg_) { 308 set_result(toType); 309 } 310 311 VirtualCastExpr::VirtualCastExpr( const VirtualCastExpr &other ) : Expression( other ), arg( maybeClone( other.arg ) ) { 312 } 313 314 VirtualCastExpr::~VirtualCastExpr() { 315 delete arg; 316 } 317 318 void VirtualCastExpr::print( std::ostream &os, int indent ) const { 319 os << "Virtual Cast of:" << std::endl << std::string( indent+2, ' ' ); 320 arg->print(os, indent+2); 321 os << std::endl << std::string( indent, ' ' ) << "to:" << std::endl; 322 os << std::string( indent+2, ' ' ); 323 if ( ! result ) { 324 os << "unknown"; 300 325 } else { 301 326 result->print( os, indent+2 ); … … 503 528 } 504 529 505 AsmExpr::AsmExpr( const AsmExpr & other ) : inout( maybeClone( other.inout ) ), constraint( maybeClone( other.constraint ) ), operand( maybeClone( other.operand ) ) {}530 AsmExpr::AsmExpr( const AsmExpr & other ) : Expression( other ), inout( maybeClone( other.inout ) ), constraint( maybeClone( other.constraint ) ), operand( maybeClone( other.operand ) ) {} 506 531 507 532
Note: See TracChangeset
for help on using the changeset viewer.