about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
-rw-r--r--src/rustllvm/RustWrapper.cpp30
1 files changed, 30 insertions, 0 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp
index 614c1723c5f..27ba508293e 100644
--- a/src/rustllvm/RustWrapper.cpp
+++ b/src/rustllvm/RustWrapper.cpp
@@ -785,3 +785,33 @@ extern "C" LLVMValueRef LLVMDIBuilderInsertDeclareBefore(
         unwrapDI<DIVariable>(VarInfo), 
         unwrap<Instruction>(InsertBefore)));
 }
+
+extern "C" LLVMValueRef LLVMDIBuilderCreateEnumerator(
+    DIBuilderRef Builder,
+    const char* Name,
+    uint64_t Val)
+{
+    return wrap(Builder->createEnumerator(Name, Val));
+}
+
+extern "C" LLVMValueRef LLVMDIBuilderCreateEnumerationType(
+    DIBuilderRef Builder,
+    LLVMValueRef Scope,
+    const char* Name,
+    LLVMValueRef File,
+    unsigned LineNumber,
+    uint64_t SizeInBits,
+    uint64_t AlignInBits,
+    LLVMValueRef Elements,
+    LLVMValueRef ClassType)
+{
+    return wrap(Builder->createEnumerationType(
+        unwrapDI<DIDescriptor>(Scope),
+        Name,
+        unwrapDI<DIFile>(File),
+        LineNumber,
+        SizeInBits,
+        AlignInBits,
+        unwrapDI<DIArray>(Elements),
+        unwrapDI<DIType>(ClassType)));
+}
\ No newline at end of file