Skip to content

Commit 6df8e4b

Browse files
justinbalexanderandrewrk
authored andcommitted
Add DIFlagStaticMember flag to functions.
Prevents LLVM from generating debug info for struct member functions with a pointer as the first parameter as though the first parameter were the implicit "this" pointer from C++.
1 parent d8b6fa9 commit 6df8e4b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/zig_llvm.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -605,7 +605,7 @@ ZigLLVMDISubprogram *ZigLLVMCreateFunction(ZigLLVMDIBuilder *dibuilder, ZigLLVMD
605605
reinterpret_cast<DIFile*>(file),
606606
lineno,
607607
di_sub_type,
608-
is_local_to_unit, is_definition, scope_line, DINode::FlagZero, is_optimized,
608+
is_local_to_unit, is_definition, scope_line, DINode::FlagStaticMember, is_optimized,
609609
nullptr,
610610
reinterpret_cast<DISubprogram *>(decl_subprogram));
611611
return reinterpret_cast<ZigLLVMDISubprogram*>(result);

0 commit comments

Comments
 (0)