Changeset 1db21619 for src/SynTree/FunctionDecl.cc
- Timestamp:
- Jul 16, 2015, 5:28:24 PM (9 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 994ec2c
- Parents:
- 724c2b6
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/SynTree/FunctionDecl.cc
r724c2b6 r1db21619 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Peter A. Buhr 12 // Last Modified On : Sat Jun 13 09:10:32201513 // Update Count : 1 612 // Last Modified On : Mon Jul 13 18:11:44 2015 13 // Update Count : 19 14 14 // 15 15 … … 22 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 ), isInline( isInline ), isNoreturn( isNoreturn ) { 24 : Parent( name, sc, linkage ), type( type ), statements( statements ) { 25 set_isInline( isInline ); 26 set_isNoreturn( isNoreturn ); 25 27 // this is a brazen hack to force the function "main" to have C linkage 26 28 if ( name == "main" ) { … … 30 32 31 33 FunctionDecl::FunctionDecl( const FunctionDecl &other ) 32 : Parent( other ), type( maybeClone( other.type ) ), statements( maybeClone( other.statements ) ) , isInline( other.isInline ), isNoreturn( other.isNoreturn ){34 : Parent( other ), type( maybeClone( other.type ) ), statements( maybeClone( other.statements ) ) { 33 35 } 34 36 … … 57 59 os << LinkageSpec::toString( get_linkage() ) << " "; 58 60 } // if 59 if ( isInline) {61 if ( get_isInline() ) { 60 62 os << "inline "; 61 63 } // if 62 if ( isNoreturn) {64 if ( get_isNoreturn() ) { 63 65 os << "_Noreturn "; 64 66 } // if … … 96 98 os << get_name() << ": "; 97 99 } // if 98 if ( isInline) {100 if ( get_isInline() ) { 99 101 os << "inline "; 100 102 } // if 101 if ( isNoreturn) {103 if ( get_isNoreturn() ) { 102 104 os << "_Noreturn "; 103 105 } // if
Note: See TracChangeset
for help on using the changeset viewer.