diff options
| author | Oleksiy Vyalov <ovyalov@google.com> | 2015-05-08 23:54:34 +0000 |
|---|---|---|
| committer | Oleksiy Vyalov <ovyalov@google.com> | 2015-05-08 23:54:34 +0000 |
| commit | a9ea07113c9fb7cbd04a137c134ecaeb0f01e6f9 (patch) | |
| tree | 4f5b41b1ab8d871ef1868e0d503f5ca9c75b0ff2 /lldb/source/Host/posix/FileSystem.cpp | |
| parent | f54b73d681d6d65a75cbd887939a75d652dbc24e (diff) | |
Use hard links to link sysroot files within ModuleCache.
http://reviews.llvm.org/D9587
llvm-svn: 236917
Diffstat (limited to 'lldb/source/Host/posix/FileSystem.cpp')
| -rw-r--r-- | lldb/source/Host/posix/FileSystem.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lldb/source/Host/posix/FileSystem.cpp b/lldb/source/Host/posix/FileSystem.cpp index 813d96bda78f..15ded773408d 100644 --- a/lldb/source/Host/posix/FileSystem.cpp +++ b/lldb/source/Host/posix/FileSystem.cpp @@ -149,6 +149,15 @@ FileSystem::GetFileExists(const FileSpec &file_spec) } Error +FileSystem::Hardlink(const char *src, const char *dst) +{ + Error error; + if (::link(dst, src) == -1) + error.SetErrorToErrno(); + return error; +} + +Error FileSystem::Symlink(const char *src, const char *dst) { Error error; |
