about summary refs log tree commit diff
path: root/src/rustllvm/RustWrapper.cpp
diff options
context:
space:
mode:
authorTim Neumann <mail@timnn.me>2017-07-21 13:31:19 +0200
committerTim Neumann <mail@timnn.me>2017-07-21 14:31:54 +0200
commit48424c97490b3a449c57d8540529af4971386c4a (patch)
tree7c97400424560b7d4763538a6e93685b79e86b96 /src/rustllvm/RustWrapper.cpp
parent5f9e432534d54aebc2fa45f83becd13bccafa2d7 (diff)
downloadrust-48424c97490b3a449c57d8540529af4971386c4a.tar.gz
rust-48424c97490b3a449c57d8540529af4971386c4a.zip
rustllvm: adjust usage of createNameSpace
Diffstat (limited to 'src/rustllvm/RustWrapper.cpp')
-rw-r--r--src/rustllvm/RustWrapper.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/rustllvm/RustWrapper.cpp b/src/rustllvm/RustWrapper.cpp
index 7c3746c4c2a..1e39a0d6b33 100644
--- a/src/rustllvm/RustWrapper.cpp
+++ b/src/rustllvm/RustWrapper.cpp
@@ -753,7 +753,11 @@ LLVMRustDIBuilderCreateNameSpace(LLVMRustDIBuilderRef Builder,
                                  LLVMMetadataRef Scope, const char *Name,
                                  LLVMMetadataRef File, unsigned LineNo) {
   return wrap(Builder->createNameSpace(
-      unwrapDI<DIDescriptor>(Scope), Name, unwrapDI<DIFile>(File), LineNo
+      unwrapDI<DIDescriptor>(Scope), Name
+#if LLVM_VERSION_LT(5, 0)
+      ,
+      unwrapDI<DIFile>(File), LineNo
+#endif
 #if LLVM_VERSION_GE(4, 0)
       ,
       false // ExportSymbols (only relevant for C++ anonymous namespaces)