Changeset 03e5d14 for src/CodeGen
- Timestamp:
- May 6, 2016, 3:45:23 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, with_gc
- Children:
- 9e2c1f0, af18713, fac84be
- Parents:
- 37024fd
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
r37024fd r03e5d14 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Fri May 06 1 4:57:16201612 // Last Modified On : Fri May 06 15:40:35 2016 13 13 // Update Count : 243 14 14 // … … 76 76 void CodeGenerator::visit( FunctionDecl *functionDecl ) { 77 77 // generalize this 78 switch ( functionDecl->get_attribute() ) { 79 case FunctionDecl::Constructor: 80 output << "__attribute__ ((constructor)) "; 78 FunctionDecl::Attribute attr = functionDecl->get_attribute(); 79 switch ( attr.type ) { 80 case FunctionDecl::Attribute::Constructor: 81 output << "__attribute__ ((constructor"; 82 if ( attr.priority != FunctionDecl::Attribute::Default ) { 83 output << "(" << attr.priority << ")"; 84 } 85 output << ")) "; 81 86 break; 82 case FunctionDecl::Destructor: 83 output << "__attribute__ ((destructor)) "; 87 case FunctionDecl::Attribute::Destructor: 88 output << "__attribute__ ((destructor"; 89 if ( attr.priority != FunctionDecl::Attribute::Default ) { 90 output << "(" << attr.priority << ")"; 91 } 92 output << ")) "; 84 93 break; 85 94 default:
Note: See TracChangeset
for help on using the changeset viewer.