Skip to content

Commit 9360f7c

Browse files
committed
Don't call collect_debug_info when debuginfo is disabled
1 parent 989bb25 commit 9360f7c

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
@@ -63,7 +63,9 @@ pub(crate) fn codegen_fn<'tcx>(
6363
func.clear();
6464
func.name = UserFuncName::user(0, func_id.as_u32());
6565
func.signature = sig;
66-
func.collect_debug_info();
66+
if cx.debug_context.is_some() {
67+
func.collect_debug_info();
68+
}
6769

6870
let mut bcx = FunctionBuilder::new(&mut func, &mut func_ctx);
6971

0 commit comments

Comments
 (0)