Skip to content

Commit 25b5e75

Browse files
committed
Don't call collect_debug_info when debuginfo is disabled
1 parent bf8061e commit 25b5e75

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/base.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,9 @@ pub(crate) fn codegen_fn<'tcx>(
6565
func.clear();
6666
func.name = UserFuncName::user(0, func_id.as_u32());
6767
func.signature = sig;
68-
func.collect_debug_info();
68+
if cx.debug_context.is_some() {
69+
func.collect_debug_info();
70+
}
6971

7072
let mut bcx = FunctionBuilder::new(&mut func, &mut func_ctx);
7173

0 commit comments

Comments
 (0)