| ... | ... | @@ -2198,6 +2198,7 @@ pub const Object = struct { |
| 2198 | 2198 | const field_size = field.ty.abiSize(mod); |
| 2199 | 2199 | const field_align = field.normalAlignment(mod); |
| 2200 | 2200 | |
| 2201 | const field_di_ty = try o.lowerDebugType(field.ty, .full); |
| 2201 | 2202 | di_fields.appendAssumeCapacity(dib.createMemberType( |
| 2202 | 2203 | fwd_decl.toScope(), |
| 2203 | 2204 | mod.intern_pool.stringToSlice(field_name), |
| ... | ... | @@ -2207,7 +2208,7 @@ pub const Object = struct { |
| 2207 | 2208 | field_align * 8, // align in bits |
| 2208 | 2209 | 0, // offset in bits |
| 2209 | 2210 | 0, // flags |
| 2210 | | try o.lowerDebugType(field.ty, .full), |
| 2211 | field_di_ty, |
| 2211 | 2212 | )); |
| 2212 | 2213 | } |
| 2213 | 2214 | |
| ... | ... | @@ -2377,8 +2378,9 @@ pub const Object = struct { |
| 2377 | 2378 | const mod = o.module; |
| 2378 | 2379 | const decl = mod.declPtr(decl_index); |
| 2379 | 2380 | const fields: [0]*llvm.DIType = .{}; |
| 2381 | const di_scope = try o.namespaceToDebugScope(decl.src_namespace); |
| 2380 | 2382 | return o.di_builder.?.createStructType( |
| 2381 | | try o.namespaceToDebugScope(decl.src_namespace), |
| 2383 | di_scope, |
| 2382 | 2384 | mod.intern_pool.stringToSlice(decl.name), // TODO use fully qualified name |
| 2383 | 2385 | try o.getDIFile(o.gpa, mod.namespacePtr(decl.src_namespace).file_scope), |
| 2384 | 2386 | decl.src_line + 1, |
| ... | ... | @@ -5940,8 +5942,6 @@ pub const FuncGen = struct { |
| 5940 | 5942 | .base_line = self.base_line, |
| 5941 | 5943 | }); |
| 5942 | 5944 | |
| 5943 | | const fqn = mod.intern_pool.stringToSlice(try decl.getFullyQualifiedName(mod)); |
| 5944 | | |
| 5945 | 5945 | const is_internal_linkage = !mod.decl_exports.contains(decl_index); |
| 5946 | 5946 | const fn_ty = try mod.funcType(.{ |
| 5947 | 5947 | .param_types = &.{}, |
| ... | ... | @@ -5958,13 +5958,15 @@ pub const FuncGen = struct { |
| 5958 | 5958 | .section_is_generic = false, |
| 5959 | 5959 | .addrspace_is_generic = false, |
| 5960 | 5960 | }); |
| 5961 | const fn_di_ty = try self.dg.object.lowerDebugType(fn_ty, .full); |
| 5962 | const fqn = mod.intern_pool.stringToSlice(try decl.getFullyQualifiedName(mod)); |
| 5961 | 5963 | const subprogram = dib.createFunction( |
| 5962 | 5964 | di_file.toScope(), |
| 5963 | 5965 | mod.intern_pool.stringToSlice(decl.name), |
| 5964 | 5966 | fqn, |
| 5965 | 5967 | di_file, |
| 5966 | 5968 | line_number, |
| 5967 | | try self.dg.object.lowerDebugType(fn_ty, .full), |
| 5969 | fn_di_ty, |
| 5968 | 5970 | is_internal_linkage, |
| 5969 | 5971 | true, // is definition |
| 5970 | 5972 | line_number + func.lbrace_line, // scope line |