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