From 9fd5d42e46f3a6e47161e04e0b661d8df277a281 Mon Sep 17 00:00:00 2001 From: kai Date: Sun, 7 Jul 2013 15:34:09 +0200 Subject: [PATCH] Fix ldmd using LLVM 3.4. unique_file was renamed to createUniqueFile. --- driver/ldmd.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/driver/ldmd.cpp b/driver/ldmd.cpp index fe3d8d9a..9b6f9548 100644 --- a/driver/ldmd.cpp +++ b/driver/ldmd.cpp @@ -80,9 +80,15 @@ namespace ls = llvm::sys; namespace llvm { namespace sys { namespace fs { + bool can_execute(const Twine &Path) { return ls::Path(Path.str()).canExecute(); } + +error_code createUniqueFile(const Twine &Model, int &ResultFD, + SmallVectorImpl &ResultPath) { + return llvm::sys::fs::unique_file(Model, ResultFD, ResultPath); +} } } } @@ -1010,7 +1016,7 @@ int main(int argc, char *argv[]) { int rspFd; llvm::SmallString<128> rspPath; - if (ls::fs::unique_file("ldmd-%%-%%-%%-%%.rsp", rspFd, rspPath) != + if (ls::fs::createUniqueFile("ldmd-%%-%%-%%-%%.rsp", rspFd, rspPath) != llvm::errc::success) { error("Could not open temporary response file.");