Changes in src/SynTree/FunctionDecl.cc [d3b7937:4e24610]
- File:
-
- 1 edited
-
src/SynTree/FunctionDecl.cc (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/FunctionDecl.cc
rd3b7937 r4e24610 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 11:35:09 2016 13 13 // Update Count : 19 14 14 // … … 21 21 #include "Common/utility.h" 22 22 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 ) {23 FunctionDecl::FunctionDecl( const std::string &name, DeclarationNode::StorageClass sc, LinkageSpec::Type linkage, FunctionType *type, CompoundStmt *statements, bool isInline, bool isNoreturn, Attribute attribute ) 24 : Parent( name, sc, linkage ), type( type ), statements( statements ), attribute( attribute ) { 25 25 set_isInline( isInline ); 26 26 set_isNoreturn( isNoreturn ); … … 32 32 33 33 FunctionDecl::FunctionDecl( const FunctionDecl &other ) 34 : Parent( other ), type( maybeClone( other.type ) ), statements( maybeClone( other.statements ) ) {34 : Parent( other ), type( maybeClone( other.type ) ), statements( maybeClone( other.statements ) ), attribute( other.attribute ) { 35 35 } 36 36 … … 52 52 using std::endl; 53 53 using std::string; 54 54 55 55 if ( get_name() != "" ) { 56 56 os << get_name() << ": "; … … 65 65 os << "_Noreturn "; 66 66 } // if 67 switch ( attribute ) { 68 case Constructor: 69 os << "Global Constructor "; 70 break; 71 case Destructor: 72 os << "Global Destructor "; 73 break; 74 default: 75 break; 76 } 67 77 if ( get_storageClass() != DeclarationNode::NoStorageClass ) { 68 78 os << DeclarationNode::storageName[ get_storageClass() ] << ' '; … … 94 104 using std::endl; 95 105 using std::string; 96 106 97 107 if ( get_name() != "" ) { 98 108 os << get_name() << ": "; … … 104 114 os << "_Noreturn "; 105 115 } // if 116 switch ( attribute ) { 117 case Constructor: 118 os << " Global Constructor "; 119 break; 120 case Destructor: 121 os << " Global Destructor "; 122 break; 123 default: 124 break; 125 } 106 126 if ( get_storageClass() != DeclarationNode::NoStorageClass ) { 107 127 os << DeclarationNode::storageName[ get_storageClass() ] << ' ';
Note:
See TracChangeset
for help on using the changeset viewer.