diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2014-03-21 02:31:56 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2014-03-21 02:31:56 +0000 |
commit | fb307be5afa79bc65b75885ee6c3ced3b450b037 (patch) | |
tree | b367b36f17e67056dd8119ed0fc26e2e9a4055e3 /lib | |
parent | c53b3dbc20739e63c058b4a35f8f0caec18618c5 (diff) | |
download | llvm-fb307be5afa79bc65b75885ee6c3ced3b450b037.tar.gz llvm-fb307be5afa79bc65b75885ee6c3ced3b450b037.tar.bz2 llvm-fb307be5afa79bc65b75885ee6c3ced3b450b037.tar.xz |
[Support] Make sure LockFileManager works correctly with relative paths.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@204426 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib')
-rw-r--r-- | lib/Support/LockFileManager.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/Support/LockFileManager.cpp b/lib/Support/LockFileManager.cpp index c8472d8805..55858473f5 100644 --- a/lib/Support/LockFileManager.cpp +++ b/lib/Support/LockFileManager.cpp @@ -11,6 +11,7 @@ #include "llvm/ADT/StringExtras.h" #include "llvm/Support/FileSystem.h" #include "llvm/Support/MemoryBuffer.h" +#include "llvm/Support/Path.h" #include "llvm/Support/raw_ostream.h" #include <sys/stat.h> #include <sys/types.h> @@ -115,7 +116,8 @@ LockFileManager::LockFileManager(StringRef FileName) while (1) { // Create a link from the lock file name. If this succeeds, we're done. error_code EC = - sys::fs::create_link(UniqueLockFileName.str(), LockFileName.str()); + sys::fs::create_link(sys::path::filename(UniqueLockFileName.str()), + LockFileName.str()); if (EC == errc::success) return; |