void-packages/srcpkgs/ispc/patches/9d82a8023dc4b2a0dcda04b701f...

28 lines
840 B
Diff

From 9d82a8023dc4b2a0dcda04b701f685c08adc1b9b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Lukas=20B=C3=B6hm?= <suluke93@gmail.com>
Date: Sun, 18 Feb 2018 16:14:32 +0100
Subject: [PATCH] [NFC] Fix for llvm upstream change 325155
Phabricator: https://reviews.llvm.org/rL325155
GitHub: https://github.com/llvm-mirror/llvm/commit/06d6207c1c631716d4e6310246d198aa9e05c0d0
---
module.cpp | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/module.cpp b/module.cpp
index 8dc03a07..11946a76 100644
--- a/module.cpp
+++ b/module.cpp
@@ -1490,7 +1490,11 @@ Module::writeBitcode(llvm::Module *module, const char *outFileName) {
}
else
#endif /* ISPC_NVPTX_ENABLED */
+#if ISPC_LLVM_VERSION < ISPC_LLVM_7_0
llvm::WriteBitcodeToFile(module, fos);
+#else
+ llvm::WriteBitcodeToFile(*module, fos);
+#endif
return true;
}