diff options
| author | Michael Woerister <michaelwoerister@gmail> | 2013-07-02 10:33:51 +0200 |
|---|---|---|
| committer | Michael Woerister <michaelwoerister@gmail> | 2013-07-19 07:55:24 +0200 |
| commit | 739f3eece9c341f4f1e70b8a0417853ed2a09cbc (patch) | |
| tree | 5269178c6faac201b5ac764a6a07b2531a1f48e3 /src/rustllvm/RustWrapper.cpp | |
| parent | 99ebb816cf9db45953c123bec95c2c3e19ed2302 (diff) | |
| download | rust-739f3eece9c341f4f1e70b8a0417853ed2a09cbc.tar.gz rust-739f3eece9c341f4f1e70b8a0417853ed2a09cbc.zip | |
debuginfo: Added support for c-style enums.
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
| -rw-r--r-- | src/rustllvm/RustWrapper.cpp | 30 |
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 |
