Commit 6df8e4bca7

alexander <justin.b.alexander1@gmail.com>
2018-12-30 04:49:31
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
Changed files (1)
src/zig_llvm.cpp
@@ -605,7 +605,7 @@ ZigLLVMDISubprogram *ZigLLVMCreateFunction(ZigLLVMDIBuilder *dibuilder, ZigLLVMD
             reinterpret_cast<DIFile*>(file),
             lineno,
             di_sub_type,
-            is_local_to_unit, is_definition, scope_line, DINode::FlagZero, is_optimized,
+            is_local_to_unit, is_definition, scope_line, DINode::FlagStaticMember, is_optimized,
             nullptr,
             reinterpret_cast<DISubprogram *>(decl_subprogram));
     return reinterpret_cast<ZigLLVMDISubprogram*>(result);