aboutsummaryrefslogtreecommitdiffhomepage
path: root/llvm_zluda/src/lib.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm_zluda/src/lib.cpp')
-rw-r--r--llvm_zluda/src/lib.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm_zluda/src/lib.cpp b/llvm_zluda/src/lib.cpp
new file mode 100644
index 0000000..3da88fb
--- /dev/null
+++ b/llvm_zluda/src/lib.cpp
@@ -0,0 +1,13 @@
+#include <llvm-c/Core.h>
+#include "llvm/IR/IRBuilder.h"
+#include "llvm/IR/Type.h"
+
+LLVM_C_EXTERN_C_BEGIN
+
+LLVMValueRef LLVMZludaBuildAlloca(LLVMBuilderRef B, LLVMTypeRef Ty, unsigned AddrSpace,
+ const char *Name)
+{
+ return llvm::wrap(llvm::unwrap(B)->CreateAlloca(llvm::unwrap(Ty), AddrSpace, nullptr, Name));
+}
+
+LLVM_C_EXTERN_C_END \ No newline at end of file