Changeset f326f99 for src/CodeGen
- Timestamp:
- Apr 11, 2016, 4:56:43 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:
- f77f12e2
- Parents:
- eab39cd
- Location:
- src/CodeGen
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/CodeGen/CodeGenerator.cc
reab39cd rf326f99 10 10 // Created On : Mon May 18 07:44:20 2015 11 11 // Last Modified By : Rob Schluntz 12 // Last Modified On : Mon Apr 04 17:08:06201612 // Last Modified On : Mon Apr 11 15:30:52 2016 13 13 // Update Count : 255 14 14 // … … 67 67 string mangleName( DeclarationWithType *decl ) { 68 68 if ( decl->get_mangleName() != "" ) { 69 return decl->get_mangleName(); 69 // need to incorporate scope level in order to differentiate names for destructors 70 return decl->get_scopedMangleName(); 70 71 } else { 71 72 return decl->get_name(); -
src/CodeGen/FixNames.cc
reab39cd rf326f99 5 5 // file "LICENCE" distributed with Cforall. 6 6 // 7 // FixNames.cc -- 7 // FixNames.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 May 18 23:36:42 201511 // Last Modified By : Rob Schluntz 12 // Last Modified On : Mon Apr 11 15:38:10 2016 13 13 // Update Count : 1 14 14 // … … 26 26 virtual void visit( ObjectDecl *objectDecl ); 27 27 virtual void visit( FunctionDecl *functionDecl ); 28 29 virtual void visit( CompoundStmt *compoundStmt ); 30 31 private: 32 int scopeLevel = 1; 33 34 void fixDWT( DeclarationWithType *dwt ); 28 35 }; 29 36 … … 33 40 } 34 41 35 void fixDWT( DeclarationWithType *dwt ) {42 void FixNames::fixDWT( DeclarationWithType *dwt ) { 36 43 if ( dwt->get_name() != "" ) { 37 44 if ( LinkageSpec::isDecoratable( dwt->get_linkage() ) ) { 38 45 dwt->set_mangleName( SymTab::Mangler::mangle( dwt ) ); 46 dwt->set_scopeLevel( scopeLevel ); 39 47 } // if 40 48 } // if … … 50 58 fixDWT( functionDecl ); 51 59 } 60 61 void FixNames::visit( CompoundStmt *compoundStmt ) { 62 scopeLevel++; 63 Visitor::visit( compoundStmt ); 64 scopeLevel--; 65 } 52 66 } // namespace CodeGen 53 67
Note: See TracChangeset
for help on using the changeset viewer.