summaryrefslogtreecommitdiff
path: root/lldb/source/Core/DataFileCache.cpp
diff options
context:
space:
mode:
authorZequan Wu <zequanwu@google.com>2022-11-22 10:54:46 -0800
committerZequan Wu <zequanwu@google.com>2022-11-22 10:55:05 -0800
commiteef5405f74ae208e3e2eb7daacecac923d7338f2 (patch)
tree26014108b80023dc35bfbdfb1b33a1e2d890e16a /lldb/source/Core/DataFileCache.cpp
parent0ffcd243a42bff13966e455582d2db6c337628a2 (diff)
Revert "[LTO][COFF] Use bitcode file names in lto native object file names."
This reverts commit 531ed6d5aa65f41c6dfe2e74905d5c6c88fc95a7.
Diffstat (limited to 'lldb/source/Core/DataFileCache.cpp')
-rw-r--r--lldb/source/Core/DataFileCache.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/lldb/source/Core/DataFileCache.cpp b/lldb/source/Core/DataFileCache.cpp
index b29327db5ca3..36efccd296a3 100644
--- a/lldb/source/Core/DataFileCache.cpp
+++ b/lldb/source/Core/DataFileCache.cpp
@@ -54,8 +54,7 @@ DataFileCache::DataFileCache(llvm::StringRef path, llvm::CachePruningPolicy poli
// m_take_ownership member variable to indicate if we need to take
// ownership.
- auto add_buffer = [this](unsigned task, const llvm::Twine &moduleName,
- std::unique_ptr<llvm::MemoryBuffer> m) {
+ auto add_buffer = [this](unsigned task, std::unique_ptr<llvm::MemoryBuffer> m) {
if (m_take_ownership)
m_mem_buff_up = std::move(m);
};
@@ -81,7 +80,7 @@ DataFileCache::GetCachedData(llvm::StringRef key) {
// turn take ownership of the member buffer that is passed to the callback and
// put it into a member variable.
llvm::Expected<llvm::AddStreamFn> add_stream_or_err =
- m_cache_callback(task, key, "");
+ m_cache_callback(task, key);
m_take_ownership = false;
// At this point we either already called the "add_buffer" lambda with
// the data or we haven't. We can tell if we got the cached data by checking
@@ -113,7 +112,7 @@ bool DataFileCache::SetCachedData(llvm::StringRef key,
// add_buffer lambda function from the constructor which will ignore the
// data.
llvm::Expected<llvm::AddStreamFn> add_stream_or_err =
- m_cache_callback(task, key, "");
+ m_cache_callback(task, key);
// If we reach this code then we either already called the callback with
// the data or we haven't. We can tell if we had the cached data by checking
// the CacheAddStream function pointer value below.
@@ -128,7 +127,7 @@ bool DataFileCache::SetCachedData(llvm::StringRef key,
// want to write the data.
if (add_stream) {
llvm::Expected<std::unique_ptr<llvm::CachedFileStream>> file_or_err =
- add_stream(task, "");
+ add_stream(task);
if (file_or_err) {
llvm::CachedFileStream *cfs = file_or_err->get();
cfs->OS->write((const char *)data.data(), data.size());