Changes in src/SynTree/FunctionDecl.cc [d3b7937:03e5d14]
- File:
-
- 1 edited
-
src/SynTree/FunctionDecl.cc (modified) (7 diffs)
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/FunctionDecl.cc
rd3b7937 r03e5d14 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:41:05 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.type ) { 68 case Attribute::Constructor: 69 os << "Global Constructor "; 70 break; 71 case Attribute::Destructor: 72 os << "Global Destructor "; 73 break; 74 default: 75 break; 76 } 77 if ( attribute.priority != Attribute::Default ) { 78 os << "with priority " << attribute.priority << " "; 79 } 67 80 if ( get_storageClass() != DeclarationNode::NoStorageClass ) { 68 81 os << DeclarationNode::storageName[ get_storageClass() ] << ' '; … … 94 107 using std::endl; 95 108 using std::string; 96 109 97 110 if ( get_name() != "" ) { 98 111 os << get_name() << ": "; … … 104 117 os << "_Noreturn "; 105 118 } // if 119 switch ( attribute.type ) { 120 case Attribute::Constructor: 121 os << " Global Constructor "; 122 break; 123 case Attribute::Destructor: 124 os << " Global Destructor "; 125 break; 126 default: 127 break; 128 } 129 if ( attribute.priority != Attribute::Default ) { 130 os << "with priority " << attribute.priority << " "; 131 } 106 132 if ( get_storageClass() != DeclarationNode::NoStorageClass ) { 107 133 os << DeclarationNode::storageName[ get_storageClass() ] << ' ';
Note:
See TracChangeset
for help on using the changeset viewer.