From 02d40239aa507f09b3921e87bd2f0fd2b7c54e4d Mon Sep 17 00:00:00 2001 From: kai Date: Sun, 7 Jul 2013 14:33:47 +0200 Subject: [PATCH] unique_file was renamed to createUniqueFile in LLVM. Fixes yet another LLVM 3.4 compile error. --- driver/toobj.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/driver/toobj.cpp b/driver/toobj.cpp index 6e32c21c..56fac463 100644 --- a/driver/toobj.cpp +++ b/driver/toobj.cpp @@ -144,12 +144,16 @@ void writeModule(llvm::Module* m, std::string filename) llvm::sys::path::replace_extension(spath, global.s_ext); if (!global.params.output_s) { +#if LDC_LLVM_VER >= 304 + llvm::sys::fs::createUniqueFile("ldc-%%%%%%%.s", spath); +#else int Dummy; llvm::sys::fs::unique_file("ldc-%%%%%%%.s", Dummy, spath, true #if LDC_LLVM_VER >= 302 , 0 #endif ); +#endif } Logger::println("Writing native asm to: %s\n", spath.c_str());