Changeset 9dbf7c8 for src/GenPoly/CopyParams.cc
- Timestamp:
- Oct 19, 2017, 11:15:36 AM (6 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, deferred_resn, demangler, enum, forall-pointer-decay, jacob/cs343-translation, jenkins-sandbox, master, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, with_gc
- Children:
- aabc60c
- Parents:
- 582ee28
- git-author:
- Rob Schluntz <rschlunt@…> (10/17/17 12:55:58)
- git-committer:
- Rob Schluntz <rschlunt@…> (10/19/17 11:15:36)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/GenPoly/CopyParams.cc
r582ee28 r9dbf7c8 40 40 41 41 private: 42 std::set< UniqueId> modVars;42 std::set< DeclarationWithType * > modVars; 43 43 UniqueName namer; 44 44 }; … … 68 68 } // for 69 69 for ( std::list< DeclarationWithType* >::iterator param = funcDecl->type->parameters.begin(); param != funcDecl->type->parameters.end(); ++param ) { 70 std::set< UniqueId >::const_iterator var = modVars.find( (*param)->get_uniqueId());70 std::set< DeclarationWithType * >::const_iterator var = modVars.find( *param ); 71 71 if ( var != modVars.end() ) { 72 72 TypeInstType *typeInst = dynamic_cast< TypeInstType* >( (*param)->get_type() ); 73 assertf( typeInst, "Found in modVars for function %s: unique id: %u, %s", funcDecl->name.c_str(), (*param)->get_uniqueId(), toString( *param ).c_str() );74 73 std::map< std::string, DeclarationWithType* >::const_iterator assignOp = assignOps.find( typeInst->name ); 75 74 if ( assignOp != assignOps.end() ) { … … 99 98 if ( VariableExpr *varExpr = dynamic_cast< VariableExpr* >( addrExpr->arg ) ) { 100 99 if ( dynamic_cast< TypeInstType* >( varExpr->var->get_type() ) ) { 101 assertf( varExpr->var->get_uniqueId(), "Address-taken variable does not have a unique ID: %s", toString( varExpr->var ).c_str() ); 102 modVars.insert( varExpr->var->get_uniqueId() ); 103 std::cerr << "added unique id: " << varExpr->var->get_uniqueId() << " var: " << varExpr->var << std::endl; 100 modVars.insert( varExpr->var ); 104 101 } // if 105 102 } // if
Note: See TracChangeset
for help on using the changeset viewer.