Changes in src/SynTree/ObjectDecl.cc [50377a4:93389c1]
- File:
-
- 1 edited
-
src/SynTree/ObjectDecl.cc (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/ObjectDecl.cc
r50377a4 r93389c1 44 44 } 45 45 46 void ObjectDecl::print( std::ostream &os, Indenter indent ) const { 47 if ( name != "" ) os << name << ": "; 46 void ObjectDecl::print( std::ostream &os, int indent ) const { 47 if ( get_name() != "" ) { 48 os << get_name() << ": "; 49 } // if 48 50 49 if ( linkage!= LinkageSpec::Cforall ) {50 os << LinkageSpec::linkageName( linkage) << " ";51 if ( get_linkage() != LinkageSpec::Cforall ) { 52 os << LinkageSpec::linkageName( get_linkage() ) << " "; 51 53 } // if 54 55 printAll( get_attributes(), os, indent ); 52 56 53 57 get_storageClasses().print( os ); 54 58 55 if ( type) {56 type->print( os, indent );59 if ( get_type() ) { 60 get_type()->print( os, indent ); 57 61 } else { 58 62 os << " untyped entity "; … … 60 64 61 65 if ( init ) { 62 os << " with initializer (" << (init->get_maybeConstructed() ? "maybe constructed" : "not constructed") << ")" << std::endl << indent+1; 63 init->print( os, indent+1 ); 64 os << std::endl; 66 os << " with initializer " << std::endl; 67 init->print( os, indent+2 ); 68 os << std::endl << std::string(indent+2, ' '); 69 os << "maybeConstructed? " << init->get_maybeConstructed(); 65 70 } // if 66 71 67 if ( ! attributes.empty() ) {68 os << std::endl << indent << "... with attributes: " << std::endl;69 printAll( attributes, os, indent+1 );70 }71 72 72 if ( bitfieldWidth ) { 73 os << indent << " with bitfield width "; 73 os << std::string(indent, ' '); 74 os << " with bitfield width "; 74 75 bitfieldWidth->print( os ); 75 76 } // if 76 77 } 77 78 78 void ObjectDecl::printShort( std::ostream &os, Indenterindent ) const {79 void ObjectDecl::printShort( std::ostream &os, int indent ) const { 79 80 #if 0 80 81 if ( get_mangleName() != "") { … … 82 83 } else 83 84 #endif 84 if ( name != "" ) os << name << ": "; 85 if ( get_name() != "" ) { 86 os << get_name() << ": "; 87 } // if 88 89 // xxx - should printShort print attributes? 85 90 86 91 get_storageClasses().print( os ); 87 92 88 if ( type) {89 type->print( os, indent );93 if ( get_type() ) { 94 get_type()->print( os, indent ); 90 95 } else { 91 96 os << "untyped entity ";
Note:
See TracChangeset
for help on using the changeset viewer.