mirror of
				https://github.com/Z3Prover/z3
				synced 2025-11-04 05:19:11 +00:00 
			
		
		
		
	trace : Sort and reorder trace tags by tag_class and tag_name
This commit is contained in:
		
							parent
							
								
									0928a1fdf0
								
							
						
					
					
						commit
						51c88c26ad
					
				
					 3 changed files with 1312 additions and 1241 deletions
				
			
		| 
						 | 
				
			
			@ -53,7 +53,7 @@ struct tag_info {
 | 
			
		|||
};
 | 
			
		||||
 | 
			
		||||
static tag_info s_tag_infos[] = {
 | 
			
		||||
    #define X(tag, tc, desc) { false, false, TraceTag::tag },
 | 
			
		||||
    #define X(tag_class, tag, desc) { false, false, TraceTag::tag },
 | 
			
		||||
#include "util/trace_tags.def"
 | 
			
		||||
#undef  X
 | 
			
		||||
};
 | 
			
		||||
| 
						 | 
				
			
			@ -115,7 +115,7 @@ void enable_trace(const char * tag_str) {
 | 
			
		|||
    TraceTag tag = find_trace_tag_by_string(tag_str);
 | 
			
		||||
    if (tag == TraceTag::Count) {
 | 
			
		||||
        warning_msg("trace tag '%s' does not exist", tag_str);
 | 
			
		||||
#define X(tag, tag_class, desc) if (has_overlap(#tag, tag_str)) warning_msg("did you mean '%s'?", #tag);
 | 
			
		||||
#define X(tag_class, tag, desc) if (has_overlap(#tag, tag_str)) warning_msg("did you mean '%s'?", #tag);
 | 
			
		||||
#include "util/trace_tags.def"
 | 
			
		||||
#undef X           
 | 
			
		||||
        return;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
										
											
												File diff suppressed because it is too large
												Load diff
											
										
									
								
							| 
						 | 
				
			
			@ -3,7 +3,7 @@
 | 
			
		|||
#include <cstring>
 | 
			
		||||
 | 
			
		||||
enum class TraceTag {
 | 
			
		||||
#define X(tag, tag_class, desc) tag,
 | 
			
		||||
#define X(tag_class, tag, desc) tag,
 | 
			
		||||
#include "util/trace_tags.def"
 | 
			
		||||
#undef X
 | 
			
		||||
    Count
 | 
			
		||||
| 
						 | 
				
			
			@ -12,7 +12,7 @@ enum class TraceTag {
 | 
			
		|||
// Convert TraceTag to string
 | 
			
		||||
inline const char* tracetag_to_string(TraceTag tag) {
 | 
			
		||||
    switch (tag) {
 | 
			
		||||
#define X(tag, tag_class, desc) case TraceTag::tag: return #tag;
 | 
			
		||||
#define X(tag_class, tag, desc) case TraceTag::tag: return #tag;
 | 
			
		||||
#include "util/trace_tags.def"
 | 
			
		||||
#undef X
 | 
			
		||||
    default: return "Unknown";
 | 
			
		||||
| 
						 | 
				
			
			@ -22,7 +22,7 @@ inline const char* tracetag_to_string(TraceTag tag) {
 | 
			
		|||
// Return description of TraceTag
 | 
			
		||||
inline const char* get_trace_tag_doc(TraceTag tag) {
 | 
			
		||||
    switch (tag) {
 | 
			
		||||
#define X(tag, tag_class, desc) case TraceTag::tag: return desc;
 | 
			
		||||
#define X(tag_class, tag, desc) case TraceTag::tag: return desc;
 | 
			
		||||
#include "util/trace_tags.def"
 | 
			
		||||
#undef X
 | 
			
		||||
    default: return "Unknown tag";
 | 
			
		||||
| 
						 | 
				
			
			@ -31,7 +31,7 @@ inline const char* get_trace_tag_doc(TraceTag tag) {
 | 
			
		|||
 | 
			
		||||
inline TraceTag get_trace_tag_class(TraceTag tag) {
 | 
			
		||||
    switch (tag) {
 | 
			
		||||
#define X(tag, tag_class, desc) case TraceTag::tag: return TraceTag::tag_class;
 | 
			
		||||
#define X(tag_class, tag, desc) case TraceTag::tag: return TraceTag::tag_class;
 | 
			
		||||
#include "util/trace_tags.def"
 | 
			
		||||
#undef X
 | 
			
		||||
    default: return TraceTag::Count;
 | 
			
		||||
| 
						 | 
				
			
			@ -42,7 +42,7 @@ inline TraceTag get_trace_tag_class(TraceTag tag) {
 | 
			
		|||
 | 
			
		||||
// Find TraceTag by string
 | 
			
		||||
inline TraceTag find_trace_tag_by_string(const char* tag_str) {
 | 
			
		||||
#define X(tag, tag_class, desc) if (strcmp(#tag, tag_str) == 0) return TraceTag::tag;
 | 
			
		||||
#define X(tag_class, tag, desc) if (strcmp(#tag, tag_str) == 0) return TraceTag::tag;
 | 
			
		||||
#include "util/trace_tags.def"
 | 
			
		||||
#undef X
 | 
			
		||||
    return TraceTag::Count;
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue