mirror of
				https://github.com/YosysHQ/yosys
				synced 2025-10-31 03:32:29 +00:00 
			
		
		
		
	Make log_experimental() just take an std::string, since it doesn't need to be varargs.
This commit is contained in:
		
							parent
							
								
									25cba6181e
								
							
						
					
					
						commit
						2a2c586e2c
					
				
					 3 changed files with 7 additions and 13 deletions
				
			
		|  | @ -413,16 +413,11 @@ void log_file_error(const string &filename, int lineno, | |||
| 	logv_file_error(filename, lineno, format, ap); | ||||
| } | ||||
| 
 | ||||
| void log_experimental(const char *format, ...) | ||||
| void log_experimental(const std::string &str) | ||||
| { | ||||
| 	va_list ap; | ||||
| 	va_start(ap, format); | ||||
| 	string s = vstringf(format, ap); | ||||
| 	va_end(ap); | ||||
| 
 | ||||
| 	if (log_experimentals_ignored.count(s) == 0 && log_experimentals.count(s) == 0) { | ||||
| 		log_warning("Feature '%s' is experimental.\n", s.c_str()); | ||||
| 		log_experimentals.insert(s); | ||||
| 	if (log_experimentals_ignored.count(str) == 0 && log_experimentals.count(str) == 0) { | ||||
| 		log_warning("Feature '%s' is experimental.\n", str); | ||||
| 		log_experimentals.insert(str); | ||||
| 	} | ||||
| } | ||||
| 
 | ||||
|  |  | |||
|  | @ -121,9 +121,6 @@ extern int log_debug_suppressed; | |||
| 
 | ||||
| [[noreturn]] void logv_file_error(const string &filename, int lineno, const char *format, va_list ap); | ||||
| 
 | ||||
| 
 | ||||
| void log_experimental(const char *format, ...) YS_ATTRIBUTE(format(printf, 1, 2)); | ||||
| 
 | ||||
| void set_verific_logging(void (*cb)(int msg_type, const char *message_id, const char* file_path, unsigned int left_line, unsigned int left_col, unsigned int right_line, unsigned int right_col, const char *msg)); | ||||
| extern void (*log_verific_callback)(int msg_type, const char *message_id, const char* file_path, unsigned int left_line, unsigned int left_col, unsigned int right_line, unsigned int right_col, const char *msg); | ||||
| 
 | ||||
|  | @ -170,6 +167,8 @@ inline void log_warning_noprefix(FmtString<TypeIdentity<Args>...> fmt, const Arg | |||
| 	log_formatted_warning("", fmt.format(args...)); | ||||
| } | ||||
| 
 | ||||
| void log_experimental(const std::string &str); | ||||
| 
 | ||||
| static inline void log_suppressed() { | ||||
| 	if (log_debug_suppressed && !log_make_debug) { | ||||
| 		log("<suppressed ~%d debug messages>\n", log_debug_suppressed); | ||||
|  |  | |||
|  | @ -265,7 +265,7 @@ void Pass::call(RTLIL::Design *design, std::vector<std::string> args) | |||
| 		log_cmd_error("No such command: %s (type 'help' for a command overview)\n", args[0].c_str()); | ||||
| 
 | ||||
| 	if (pass_register[args[0]]->experimental_flag) | ||||
| 		log_experimental("%s", args[0].c_str()); | ||||
| 		log_experimental(args[0]); | ||||
| 
 | ||||
| 	size_t orig_sel_stack_pos = design->selection_stack.size(); | ||||
| 	auto state = pass_register[args[0]]->pre_execute(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue