Changeset c0aa336 for src/SynTree/Type.cc
- Timestamp:
- Feb 6, 2017, 4:19:41 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:
- b4d65c7
- Parents:
- a362f97
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/Type.cc
ra362f97 rc0aa336 9 9 // Author : Richard C. Bilson 10 10 // Created On : Mon May 18 07:44:20 2015 11 // Last Modified By : Rob Schluntz12 // Last Modified On : Wed Dec 09 14:08:48 201513 // Update Count : 411 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Thu Feb 2 11:26:24 2017 13 // Update Count : 12 14 14 // 15 15 … … 18 18 #include "Type.h" 19 19 #include "Declaration.h" 20 #include "Attribute.h" 20 21 #include "Common/utility.h" 22 23 using namespace std; 21 24 22 25 const char *BasicType::typeNames[BasicType::NUMBER_OF_BASIC_TYPES] = { … … 44 47 }; 45 48 46 Type::Type( const Qualifiers &tq ) : tq( tq) {}49 Type::Type( const Qualifiers &tq, const std::list< Attribute * > & attributes ) : tq( tq ), attributes( attributes ) {} 47 50 48 51 Type::Type( const Type &other ) : tq( other.tq ) { 49 52 cloneAll( other.forall, forall ); 53 cloneAll( other.attributes, attributes ); 50 54 } 51 55 52 56 Type::~Type() { 53 57 deleteAll( forall ); 58 deleteAll( attributes ); 54 59 } 55 60 … … 70 75 os << "_Atomic "; 71 76 } // if 72 if ( isAttribute ) {73 os << "__attribute(( )) ";74 } // if75 77 } 76 78 … … 81 83 os << std::string( indent+2, ' ' ); 82 84 } // if 85 86 if ( ! attributes.empty() ) { 87 os << endl << string( indent+2, ' ' ) << "with attributes" << endl; 88 printAll( attributes, os, indent+4 ); 89 } // if 90 83 91 tq.print( os, indent ); 84 92 } … … 89 97 } else { 90 98 out << "nullptr"; 91 } 99 } // if 92 100 return out; 93 101 }
Note: See TracChangeset
for help on using the changeset viewer.