Skip to content

Commit 48424c9

Browse files
committed
rustllvm: adjust usage of createNameSpace
1 parent 5f9e432 commit 48424c9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/rustllvm/RustWrapper.cpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -753,7 +753,11 @@ LLVMRustDIBuilderCreateNameSpace(LLVMRustDIBuilderRef Builder,
753753
LLVMMetadataRef Scope, const char *Name,
754754
LLVMMetadataRef File, unsigned LineNo) {
755755
return wrap(Builder->createNameSpace(
756-
unwrapDI<DIDescriptor>(Scope), Name, unwrapDI<DIFile>(File), LineNo
756+
unwrapDI<DIDescriptor>(Scope), Name
757+
#if LLVM_VERSION_LT(5, 0)
758+
,
759+
unwrapDI<DIFile>(File), LineNo
760+
#endif
757761
#if LLVM_VERSION_GE(4, 0)
758762
,
759763
false // ExportSymbols (only relevant for C++ anonymous namespaces)

0 commit comments

Comments
 (0)