aboutsummaryrefslogtreecommitdiff
path: root/src/zig_llvm.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <andrew@ziglang.org>2022-03-08 21:09:20 -0500
committerGitHub <noreply@github.com>2022-03-08 21:09:20 -0500
commita91753219df5d0b51f55dcad3e2ef96044efdd62 (patch)
tree11c840f3f7405eba160c7876e64b696e08e6fd3e /src/zig_llvm.cpp
parent935d208ffb955e74864e12f0f7e265f64642a02f (diff)
parentfb4ad37e0bd07513a0a56afb45e95c68036b1eea (diff)
downloadzig-a91753219df5d0b51f55dcad3e2ef96044efdd62.tar.gz
zig-a91753219df5d0b51f55dcad3e2ef96044efdd62.zip
Merge pull request #11085 from ziglang/llvm-debug-info
stage2 LLVM debug info
Diffstat (limited to 'src/zig_llvm.cpp')
-rw-r--r--src/zig_llvm.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/zig_llvm.cpp b/src/zig_llvm.cpp
index aa07a7fed1..21e83319d9 100644
--- a/src/zig_llvm.cpp
+++ b/src/zig_llvm.cpp
@@ -942,6 +942,19 @@ LLVMValueRef ZigLLVMInsertDeclareAtEnd(ZigLLVMDIBuilder *dibuilder, LLVMValueRef
return wrap(result);
}
+LLVMValueRef ZigLLVMInsertDbgValueIntrinsicAtEnd(ZigLLVMDIBuilder *dib, LLVMValueRef val,
+ ZigLLVMDILocalVariable *var_info, ZigLLVMDILocation *debug_loc,
+ LLVMBasicBlockRef basic_block_ref)
+{
+ Instruction *result = reinterpret_cast<DIBuilder*>(dib)->insertDbgValueIntrinsic(
+ unwrap(val),
+ reinterpret_cast<DILocalVariable *>(var_info),
+ reinterpret_cast<DIBuilder*>(dib)->createExpression(),
+ reinterpret_cast<DILocation*>(debug_loc),
+ static_cast<BasicBlock*>(unwrap(basic_block_ref)));
+ return wrap(result);
+}
+
LLVMValueRef ZigLLVMInsertDeclare(ZigLLVMDIBuilder *dibuilder, LLVMValueRef storage,
ZigLLVMDILocalVariable *var_info, ZigLLVMDILocation *debug_loc, LLVMValueRef insert_before_instr)
{