diff options
author | Oleksiy Vyalov <ovyalov@google.com> | 2015-03-12 18:18:03 +0000 |
---|---|---|
committer | Oleksiy Vyalov <ovyalov@google.com> | 2015-03-12 18:18:03 +0000 |
commit | eda270ee993181e49212332635c7cf8bb2784f71 (patch) | |
tree | ef4548c4315fba1d9e553bcfa9925e1e7f5c3303 /lldb/source/Utility/ModuleCache.h | |
parent | 285dd51b7b416399b5171863432dab56968f1959 (diff) | |
download | bcm5719-llvm-eda270ee993181e49212332635c7cf8bb2784f71.tar.gz bcm5719-llvm-eda270ee993181e49212332635c7cf8bb2784f71.zip |
Make ModuleCache::Get to return instantiated ModuleSP instance so already created in-memory instance can be returned instead of creating a new one.
http://reviews.llvm.org/D8270
llvm-svn: 232075
Diffstat (limited to 'lldb/source/Utility/ModuleCache.h')
-rw-r--r-- | lldb/source/Utility/ModuleCache.h | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/lldb/source/Utility/ModuleCache.h b/lldb/source/Utility/ModuleCache.h index 15bed9d88c7..61d7087f9ad 100644 --- a/lldb/source/Utility/ModuleCache.h +++ b/lldb/source/Utility/ModuleCache.h @@ -17,9 +17,11 @@ #include "lldb/Host/FileSpec.h" #include <string> +#include <unordered_map> namespace lldb_private { +class Module; class UUID; //---------------------------------------------------------------------- @@ -45,16 +47,14 @@ public: Error Put (const FileSpec &root_dir_spec, const char *hostname, - const UUID &uuid, - const FileSpec &platform_module_spec, + const ModuleSpec &module_spec, const FileSpec &tmp_file); Error Get (const FileSpec &root_dir_spec, const char *hostname, - const UUID &uuid, - const FileSpec &platform_module_spec, - FileSpec &cached_module_spec); + const ModuleSpec &module_spec, + lldb::ModuleSP &cached_module_sp); private: static FileSpec @@ -65,6 +65,8 @@ private: static Error CreateHostSysRootModuleSymLink (const FileSpec &sysroot_module_path_spec, const FileSpec &module_file_path); + + std::unordered_map<std::string, lldb::ModuleWP> m_loaded_modules; }; } // namespace lldb_private |