aboutsummaryrefslogtreecommitdiff
path: root/source/Utility/ModuleCache.h
diff options
context:
space:
mode:
authorDimitry Andric <dim@FreeBSD.org>2017-01-02 19:26:05 +0000
committerDimitry Andric <dim@FreeBSD.org>2017-01-02 19:26:05 +0000
commit14f1b3e8826ce43b978db93a62d1166055db5394 (patch)
tree0a00ad8d3498783fe0193f3b656bca17c4c8697d /source/Utility/ModuleCache.h
parent4ee8c119c71a06dcad1e0fecc8c675e480e59337 (diff)
downloadsrc-14f1b3e8826ce43b978db93a62d1166055db5394.tar.gz
src-14f1b3e8826ce43b978db93a62d1166055db5394.zip
Vendor import of lldb trunk r290819:vendor/lldb/lldb-trunk-r290819
Notes
Notes: svn path=/vendor/lldb/dist/; revision=311128 svn path=/vendor/lldb/lldb-trunk-r290819/; revision=311129; tag=vendor/lldb/lldb-trunk-r290819
Diffstat (limited to 'source/Utility/ModuleCache.h')
-rw-r--r--source/Utility/ModuleCache.h55
1 files changed, 25 insertions, 30 deletions
diff --git a/source/Utility/ModuleCache.h b/source/Utility/ModuleCache.h
index bb9b308304b6..6faa5ffb1816 100644
--- a/source/Utility/ModuleCache.h
+++ b/source/Utility/ModuleCache.h
@@ -10,8 +10,8 @@
#ifndef utility_ModuleCache_h_
#define utility_ModuleCache_h_
-#include "lldb/lldb-types.h"
#include "lldb/lldb-forward.h"
+#include "lldb/lldb-types.h"
#include "lldb/Core/Error.h"
#include "lldb/Host/File.h"
@@ -32,50 +32,45 @@ class UUID;
///
/// Caches locally modules that are downloaded from remote targets.
/// Each cached module maintains 2 views:
-/// - UUID view: /${CACHE_ROOT}/${PLATFORM_NAME}/.cache/${UUID}/${MODULE_FILENAME}
-/// - Sysroot view: /${CACHE_ROOT}/${PLATFORM_NAME}/${HOSTNAME}/${MODULE_FULL_FILEPATH}
+/// - UUID view:
+/// /${CACHE_ROOT}/${PLATFORM_NAME}/.cache/${UUID}/${MODULE_FILENAME}
+/// - Sysroot view:
+/// /${CACHE_ROOT}/${PLATFORM_NAME}/${HOSTNAME}/${MODULE_FULL_FILEPATH}
///
/// UUID views stores a real module file, whereas Sysroot view holds a symbolic
/// link to UUID-view file.
///
/// Example:
-/// UUID view : /tmp/lldb/remote-linux/.cache/30C94DC6-6A1F-E951-80C3-D68D2B89E576-D5AE213C/libc.so.6
+/// UUID view :
+/// /tmp/lldb/remote-linux/.cache/30C94DC6-6A1F-E951-80C3-D68D2B89E576-D5AE213C/libc.so.6
/// Sysroot view: /tmp/lldb/remote-linux/ubuntu/lib/x86_64-linux-gnu/libc.so.6
//----------------------------------------------------------------------
-class ModuleCache
-{
+class ModuleCache {
public:
- using ModuleDownloader = std::function<Error (const ModuleSpec&, const FileSpec&)>;
- using SymfileDownloader = std::function<Error (const lldb::ModuleSP&, const FileSpec&)>;
+ using ModuleDownloader =
+ std::function<Error(const ModuleSpec &, const FileSpec &)>;
+ using SymfileDownloader =
+ std::function<Error(const lldb::ModuleSP &, const FileSpec &)>;
- Error
- GetAndPut(const FileSpec &root_dir_spec,
- const char *hostname,
- const ModuleSpec &module_spec,
- const ModuleDownloader &module_downloader,
- const SymfileDownloader &symfile_downloader,
- lldb::ModuleSP &cached_module_sp,
- bool *did_create_ptr);
+ Error GetAndPut(const FileSpec &root_dir_spec, const char *hostname,
+ const ModuleSpec &module_spec,
+ const ModuleDownloader &module_downloader,
+ const SymfileDownloader &symfile_downloader,
+ lldb::ModuleSP &cached_module_sp, bool *did_create_ptr);
private:
- Error
- Put (const FileSpec &root_dir_spec,
- const char *hostname,
- const ModuleSpec &module_spec,
- const FileSpec &tmp_file,
- const FileSpec &target_file);
+ Error Put(const FileSpec &root_dir_spec, const char *hostname,
+ const ModuleSpec &module_spec, const FileSpec &tmp_file,
+ const FileSpec &target_file);
- Error
- Get (const FileSpec &root_dir_spec,
- const char *hostname,
- const ModuleSpec &module_spec,
- lldb::ModuleSP &cached_module_sp,
- bool *did_create_ptr);
+ Error Get(const FileSpec &root_dir_spec, const char *hostname,
+ const ModuleSpec &module_spec, lldb::ModuleSP &cached_module_sp,
+ bool *did_create_ptr);
- std::unordered_map<std::string, lldb::ModuleWP> m_loaded_modules;
+ std::unordered_map<std::string, lldb::ModuleWP> m_loaded_modules;
};
} // namespace lldb_private
-#endif // utility_ModuleCache_h_
+#endif // utility_ModuleCache_h_