mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-30 19:22:31 +00:00 
			
		
		
		
	Add optional nullstr argument to log_id()
Signed-off-by: Clifford Wolf <clifford@clifford.at>
This commit is contained in:
		
							parent
							
								
									6c5049f016
								
							
						
					
					
						commit
						e70ebe557c
					
				
					 1 changed files with 3 additions and 1 deletions
				
			
		|  | @ -94,7 +94,9 @@ const char *log_signal(const RTLIL::SigSpec &sig, bool autoint = true); | |||
| const char *log_const(const RTLIL::Const &value, bool autoint = true); | ||||
| const char *log_id(RTLIL::IdString id); | ||||
| 
 | ||||
| template<typename T> static inline const char *log_id(T *obj) { | ||||
| template<typename T> static inline const char *log_id(T *obj, const char *nullstr = nullptr) { | ||||
| 	if (nullstr && obj == nullptr) | ||||
| 		return nullstr; | ||||
| 	return log_id(obj->name); | ||||
| } | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue