mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-11-03 21:09:12 +00:00 
			
		
		
		
	Merge pull request #5073 from YosysHQ/emil/fix-uncompressed-missing-file-error
gzip: refactor file open failure errors
This commit is contained in:
		
						commit
						11f2348246
					
				
					 5 changed files with 3 additions and 10 deletions
				
			
		| 
						 | 
				
			
			@ -350,8 +350,6 @@ void read_liberty_cellarea(dict<IdString, cell_area_t> &cell_area, string libert
 | 
			
		|||
{
 | 
			
		||||
	std::istream* f = uncompressed(liberty_file.c_str());
 | 
			
		||||
	yosys_input_files.insert(liberty_file);
 | 
			
		||||
	if (f->fail())
 | 
			
		||||
		log_cmd_error("Can't open liberty file `%s': %s\n", liberty_file.c_str(), strerror(errno));
 | 
			
		||||
	LibertyParser libparser(*f, liberty_file);
 | 
			
		||||
	delete f;
 | 
			
		||||
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -310,8 +310,6 @@ struct ClockgatePass : public Pass {
 | 
			
		|||
			LibertyMergedCells merged;
 | 
			
		||||
			for (auto path : liberty_files) {
 | 
			
		||||
				std::istream* f = uncompressed(path);
 | 
			
		||||
				if (f->fail())
 | 
			
		||||
					log_cmd_error("Can't open liberty file `%s': %s\n", path.c_str(), strerror(errno));
 | 
			
		||||
				LibertyParser p(*f, path);
 | 
			
		||||
				merged.merge(p);
 | 
			
		||||
				delete f;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -635,8 +635,6 @@ struct DfflibmapPass : public Pass {
 | 
			
		|||
		LibertyMergedCells merged;
 | 
			
		||||
		for (auto path : liberty_files) {
 | 
			
		||||
			std::istream* f = uncompressed(path);
 | 
			
		||||
			if (f->fail())
 | 
			
		||||
				log_cmd_error("Can't open liberty file `%s': %s\n", path.c_str(), strerror(errno));
 | 
			
		||||
			LibertyParser p(*f, path);
 | 
			
		||||
			merged.merge(p);
 | 
			
		||||
			delete f;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue