From 5c2e463ecd9070638fa623b3e5856188e4550a78 Mon Sep 17 00:00:00 2001 From: antlilja Date: Tue, 27 Feb 2024 17:05:55 +0100 Subject: [PATCH] LLVM: Don't create a debug lexical block when inlining --- src/codegen/llvm.zig | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/codegen/llvm.zig b/src/codegen/llvm.zig index 2682892ddb..0d4e66fdb5 100644 --- a/src/codegen/llvm.zig +++ b/src/codegen/llvm.zig @@ -6637,7 +6637,7 @@ pub const FuncGen = struct { .return_type = .void_type, }); - const subprogram = try o.builder.debugSubprogram( + self.scope = try o.builder.debugSubprogram( self.file, try o.builder.metadataString(zcu.intern_pool.stringToSlice(decl.name)), try o.builder.metadataString(zcu.intern_pool.stringToSlice(fqn)), @@ -6655,13 +6655,6 @@ pub const FuncGen = struct { o.debug_compile_unit, ); - const lexical_block = try o.builder.debugLexicalBlock( - subprogram, - self.file, - line_number, - 1, - ); - self.scope = lexical_block; self.base_line = decl.src_line; const inlined_at_location = try self.wip.debug_location.toMetadata(&o.builder); self.wip.debug_location = .{