Skip to content

Commit fd187ea

Browse files
vchuravymaleadt
authored andcommitted
add get/set subprogram DI
1 parent 87f2b0d commit fd187ea

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/debuginfo.jl

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,10 @@ export DEBUG_METADATA_VERSION, strip_debuginfo!
33
DEBUG_METADATA_VERSION() = API.LLVMDebugMetadataVersion()
44

55
strip_debuginfo!(mod::Module) = API.LLVMStripModuleDebugInfo(ref(mod))
6+
7+
if libllvm_version >= v"8.0.0"
8+
9+
set_subprogram!(func::Function, sp::Metadata) = LLVM.API.LLVMSetSubprogram(ref(func), ref(sp))
10+
get_subprogram(func::Function) = Metadata(LLVM.API.LLVMGetSubprogram(ref(func)))
11+
12+
end

0 commit comments

Comments
 (0)