From c7426cf05a166fca8aa76a690bad17111ea0dea4 Mon Sep 17 00:00:00 2001 From: Michael Woerister Date: Thu, 12 Jun 2014 18:06:14 +0200 Subject: debuginfo: Fix issue with unique type IDs not being passed to LLVM for LLVM 3.4 --- src/rustllvm/RustWrapper.cpp | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/rustllvm/RustWrapper.cpp') diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp index 2157aecf376..f42844b9f19 100644 --- a/src/rustllvm/RustWrapper.cpp +++ b/src/rustllvm/RustWrapper.cpp @@ -318,7 +318,7 @@ extern "C" LLVMValueRef LLVMDIBuilderCreateStructType( unwrapDI(Elements), RunTimeLang, unwrapDI(VTableHolder) -#if LLVM_VERSION_MINOR >= 5 +#if LLVM_VERSION_MINOR >= 4 ,UniqueId #endif )); @@ -510,7 +510,7 @@ extern "C" LLVMValueRef LLVMDIBuilderCreateUnionType( Flags, unwrapDI(Elements), RunTimeLang -#if LLVM_VERSION_MINOR >= 5 +#if LLVM_VERSION_MINOR >= 4 ,UniqueId #endif )); @@ -734,6 +734,11 @@ LLVMVersionMinor() { return LLVM_VERSION_MINOR; } +extern "C" int +LLVMVersionMajor() { + return LLVM_VERSION_MAJOR; +} + // Note that the two following functions look quite similar to the // LLVMGetSectionName function. Sadly, it appears that this function only // returns a char* pointer, which isn't guaranteed to be null-terminated. The -- cgit 1.4.1-3-g733a5