Changes in src/SynTree/FunctionDecl.cc [f9cebb5:1db21619]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/FunctionDecl.cc
rf9cebb5 r1db21619 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // FunctionDecl.cc -- 7 // FunctionDecl.cc -- 8 8 // 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 : Fri May 06 15:59:48 201611 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Mon Jul 13 18:11:44 2015 13 13 // Update Count : 19 14 14 // … … 19 19 #include "Statement.h" 20 20 #include "Type.h" 21 #include "Attribute.h" 22 #include "Common/utility.h" 21 #include "utility.h" 23 22 24 FunctionDecl::FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Type linkage, FunctionType *type, CompoundStmt *statements, bool isInline, bool isNoreturn , std::list< Attribute * > attributes)25 : Parent( name, sc, linkage , attributes), type( type ), statements( statements ) {23 FunctionDecl::FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Type linkage, FunctionType *type, CompoundStmt *statements, bool isInline, bool isNoreturn ) 24 : Parent( name, sc, linkage ), type( type ), statements( statements ) { 26 25 set_isInline( isInline ); 27 26 set_isNoreturn( isNoreturn ); … … 53 52 using std::endl; 54 53 using std::string; 55 54 56 55 if ( get_name() != "" ) { 57 56 os << get_name() << ": "; … … 66 65 os << "_Noreturn "; 67 66 } // if 68 69 printAll( get_attributes(), os, indent );70 71 67 if ( get_storageClass() != DeclarationNode::NoStorageClass ) { 72 68 os << DeclarationNode::storageName[ get_storageClass() ] << ' '; … … 91 87 if ( statements ) { 92 88 os << string( indent + 2, ' ' ) << "with body " << endl; 93 os << string( indent + 4, ' ' );94 89 statements->print( os, indent + 4 ); 95 90 } // if … … 99 94 using std::endl; 100 95 using std::string; 101 96 102 97 if ( get_name() != "" ) { 103 98 os << get_name() << ": "; … … 109 104 os << "_Noreturn "; 110 105 } // if 111 112 // xxx - should printShort print attributes?113 114 106 if ( get_storageClass() != DeclarationNode::NoStorageClass ) { 115 107 os << DeclarationNode::storageName[ get_storageClass() ] << ' ';
Note:
See TracChangeset
for help on using the changeset viewer.