diff --git a/src/llvm/di.rs b/src/llvm/di.rs index 1df4e741..94ac6702 100644 --- a/src/llvm/di.rs +++ b/src/llvm/di.rs @@ -28,6 +28,7 @@ pub struct DISanitizer { visited_nodes: HashSet, item_stack: Vec, replace_operands: HashMap, + skipped_types: Vec, } // Sanitize Rust type names to be valid C type names. @@ -67,6 +68,7 @@ impl DISanitizer { visited_nodes: HashSet::new(), item_stack: Vec::new(), replace_operands: HashMap::new(), + skipped_types: Vec::new(), } } @@ -124,9 +126,10 @@ impl DISanitizer { None => "".to_owned(), }; - warn!( + trace!( "found data carrying enum {name} ({filename}:{line}), not emitting the debug info for it" ); + self.skipped_types.push(name); is_data_carrying_enum = true; break; @@ -302,6 +305,13 @@ impl DISanitizer { self.visit_item(Item::Function(function)); } + if !self.skipped_types.is_empty() { + warn!( + "debug info was not emitted for the following types: {}", + self.skipped_types.join(", ") + ); + } + unsafe { LLVMDisposeDIBuilder(self.builder) }; }