aboutsummaryrefslogtreecommitdiff
path: root/src/zig_llvm.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2016-01-18 08:50:10 -0700
committerAndrew Kelley <superjoe30@gmail.com>2016-01-18 08:50:10 -0700
commit3a326d50051ad8b65639e5e2bbe45e41a8b35591 (patch)
tree797dc5661ae401c4d75971fb8c722a8834cfb2c9 /src/zig_llvm.cpp
parent4c50606b9d41c2c3d9f25dc8bf0848e30e338f6e (diff)
downloadzig-3a326d50051ad8b65639e5e2bbe45e41a8b35591.tar.gz
zig-3a326d50051ad8b65639e5e2bbe45e41a8b35591.zip
pave the road for function pointers
See #14
Diffstat (limited to 'src/zig_llvm.cpp')
-rw-r--r--src/zig_llvm.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/zig_llvm.cpp b/src/zig_llvm.cpp
index be4cf2ac05..0bee510fff 100644
--- a/src/zig_llvm.cpp
+++ b/src/zig_llvm.cpp
@@ -388,6 +388,11 @@ LLVMZigDIScope *LLVMZigSubprogramToScope(LLVMZigDISubprogram *subprogram) {
return reinterpret_cast<LLVMZigDIScope*>(scope);
}
+LLVMZigDIType *LLVMZigSubroutineToType(LLVMZigDISubroutineType *subrtype) {
+ DIType *di_type = reinterpret_cast<DISubroutineType*>(subrtype);
+ return reinterpret_cast<LLVMZigDIType*>(di_type);
+}
+
LLVMZigDIScope *LLVMZigTypeToScope(LLVMZigDIType *type) {
DIScope *scope = reinterpret_cast<DIType*>(type);
return reinterpret_cast<LLVMZigDIScope*>(scope);