mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-03 21:09:12 +00:00 
			
		
		
		
	Revert to stringf() rather than stringstreams.
				
					
				
			This commit is contained in:
		
							parent
							
								
									6081c1bbd3
								
							
						
					
					
						commit
						b94f38295a
					
				
					 1 changed files with 8 additions and 12 deletions
				
			
		| 
						 | 
				
			
			@ -258,22 +258,18 @@ struct RenamePass : public Pass {
 | 
			
		|||
 | 
			
		||||
				for (auto wire : module->selected_wires())
 | 
			
		||||
					if (wire->name[0] == '$') {
 | 
			
		||||
						std::ostringstream buf;
 | 
			
		||||
						do {
 | 
			
		||||
							buf.str("");
 | 
			
		||||
							buf << "\\" << pattern_prefix << counter++ << pattern_suffix;
 | 
			
		||||
						} while (module->count_id(buf.str()) > 0);
 | 
			
		||||
						new_wire_names[wire] = buf.str();
 | 
			
		||||
						RTLIL::IdString buf;
 | 
			
		||||
						do buf = stringf("\\%s%d%s", pattern_prefix.c_str(), counter++, pattern_suffix.c_str());
 | 
			
		||||
						while (module->wire(buf) != nullptr);
 | 
			
		||||
						new_wire_names[wire] = buf;
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
				for (auto cell : module->selected_cells())
 | 
			
		||||
					if (cell->name[0] == '$') {
 | 
			
		||||
						std::ostringstream buf;
 | 
			
		||||
						do {
 | 
			
		||||
							buf.str("");
 | 
			
		||||
							buf << "\\" << pattern_prefix << counter++ << pattern_suffix;
 | 
			
		||||
						} while (module->count_id(buf.str()) > 0);
 | 
			
		||||
						new_cell_names[cell] = buf.str();
 | 
			
		||||
						RTLIL::IdString buf;
 | 
			
		||||
						do buf = stringf("\\%s%d%s", pattern_prefix.c_str(), counter++, pattern_suffix.c_str());
 | 
			
		||||
						while (module->cell(buf) != nullptr);
 | 
			
		||||
						new_cell_names[cell] = buf;
 | 
			
		||||
					}
 | 
			
		||||
 | 
			
		||||
				for (auto &it : new_wire_names)
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue