aboutsummaryrefslogtreecommitdiff
path: root/src/zig_llvm.cpp
diff options
context:
space:
mode:
authorAndrew Kelley <superjoe30@gmail.com>2016-04-28 15:10:27 -0700
committerAndrew Kelley <superjoe30@gmail.com>2016-04-28 15:10:27 -0700
commita299de2265ae1fc2da31214725ea5bf399848319 (patch)
tree98dd5e1a3e61f5ae0f0bb4cd8a75e5f1fee049d1 /src/zig_llvm.cpp
parent4815c03caa08ecca6bdca85885506e850f9869b1 (diff)
downloadzig-a299de2265ae1fc2da31214725ea5bf399848319.tar.gz
zig-a299de2265ae1fc2da31214725ea5bf399848319.zip
better alignment value for stack variables
fixes debug info sometimes not being available for parameters
Diffstat (limited to 'src/zig_llvm.cpp')
-rw-r--r--src/zig_llvm.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/zig_llvm.cpp b/src/zig_llvm.cpp
index 8e56ed3de5..cc0b63d1c3 100644
--- a/src/zig_llvm.cpp
+++ b/src/zig_llvm.cpp
@@ -641,6 +641,10 @@ void ZigLLVMAddModuleDebugInfoFlag(LLVMModuleRef module) {
unwrap(module)->addModuleFlag(Module::Warning, "Debug Info Version", DEBUG_METADATA_VERSION);
}
+unsigned ZigLLVMGetPrefTypeAlignment(LLVMTargetDataRef TD, LLVMTypeRef Ty) {
+ return unwrap(TD)->getPrefTypeAlignment(unwrap(Ty));
+}
+
//------------------------------------
#include "buffer.hpp"