diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2018-11-10 22:44:06 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2018-11-10 22:44:06 +0000 |
commit | 1cc0714c68438f6ddf78b84599f8e80642a2233a (patch) | |
tree | 8f5101311e228a88b26aec44e303bc0126208a0c /lldb/source/Core/SourceManager.cpp | |
parent | 3889c36d3fcc9d1fc7b8426ab8dae05214bf9ba3 (diff) | |
download | bcm5719-llvm-1cc0714c68438f6ddf78b84599f8e80642a2233a.tar.gz bcm5719-llvm-1cc0714c68438f6ddf78b84599f8e80642a2233a.zip |
Extract construction of DataBufferLLVM into FileSystem
This moves construction of data buffers into the FileSystem class. Like
some of the previous refactorings we don't translate the path yet
because the functionality hasn't been landed in LLVM yet.
Differential revision: https://reviews.llvm.org/D54272
llvm-svn: 346598
Diffstat (limited to 'lldb/source/Core/SourceManager.cpp')
-rw-r--r-- | lldb/source/Core/SourceManager.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lldb/source/Core/SourceManager.cpp b/lldb/source/Core/SourceManager.cpp index 58c414b4346..41bc0d85792 100644 --- a/lldb/source/Core/SourceManager.cpp +++ b/lldb/source/Core/SourceManager.cpp @@ -442,7 +442,7 @@ void SourceManager::File::CommonInitializer(const FileSpec &file_spec, } if (m_mod_time != llvm::sys::TimePoint<>()) - m_data_sp = DataBufferLLVM::CreateFromPath(m_file_spec.GetPath()); + m_data_sp = FileSystem::Instance().CreateDataBuffer(m_file_spec); } uint32_t SourceManager::File::GetLineOffset(uint32_t line) { @@ -520,7 +520,7 @@ void SourceManager::File::UpdateIfNeeded() { if (curr_mod_time != llvm::sys::TimePoint<>() && m_mod_time != curr_mod_time) { m_mod_time = curr_mod_time; - m_data_sp = DataBufferLLVM::CreateFromPath(m_file_spec.GetPath()); + m_data_sp = FileSystem::Instance().CreateDataBuffer(m_file_spec); m_offsets.clear(); } } |