summaryrefslogtreecommitdiffstats
path: root/lldb/source/Target/Platform.cpp
diff options
context:
space:
mode:
authorOleksiy Vyalov <ovyalov@google.com>2015-05-07 15:28:49 +0000
committerOleksiy Vyalov <ovyalov@google.com>2015-05-07 15:28:49 +0000
commit919ef9dc37f7b222fe7f11af5889c3a86a4c2469 (patch)
tree027f1e8b488c77a32795a184c35044709564b36b /lldb/source/Target/Platform.cpp
parent9f88702ac605c776de54f09018af7f2e52c74714 (diff)
downloadbcm5719-llvm-919ef9dc37f7b222fe7f11af5889c3a86a4c2469.tar.gz
bcm5719-llvm-919ef9dc37f7b222fe7f11af5889c3a86a4c2469.zip
Use file locks to synchronize access to ModuleCache.
http://reviews.llvm.org/D9056 llvm-svn: 236736
Diffstat (limited to 'lldb/source/Target/Platform.cpp')
-rw-r--r--lldb/source/Target/Platform.cpp10
1 files changed, 1 insertions, 9 deletions
diff --git a/lldb/source/Target/Platform.cpp b/lldb/source/Target/Platform.cpp
index 63f8f4184cd..46e74f0ffd6 100644
--- a/lldb/source/Target/Platform.cpp
+++ b/lldb/source/Target/Platform.cpp
@@ -1840,16 +1840,8 @@ Platform::GetCachedSharedModule (const ModuleSpec &module_spec,
GetModuleCacheRoot (),
GetCacheHostname (),
module_spec,
- [=](const ModuleSpec &module_spec, FileSpec &tmp_download_file_spec)
+ [=](const ModuleSpec &module_spec, const FileSpec &tmp_download_file_spec)
{
- // Get temporary file name for a downloaded module.
- llvm::SmallString<PATH_MAX> tmp_download_file_path;
- const auto err_code = llvm::sys::fs::createTemporaryFile (
- "lldb", module_spec.GetUUID ().GetAsString ().c_str (), tmp_download_file_path);
- if (err_code)
- return Error ("Failed to create temp file: %s", err_code.message ().c_str ());
-
- tmp_download_file_spec.SetFile (tmp_download_file_path.c_str (), true);
return DownloadModuleSlice (module_spec.GetFileSpec (),
module_spec.GetObjectOffset (),
module_spec.GetObjectSize (),
OpenPOWER on IntegriCloud