diff options
author | Jonas Devlieghere <jonas@devlieghere.com> | 2018-11-12 21:24:50 +0000 |
---|---|---|
committer | Jonas Devlieghere <jonas@devlieghere.com> | 2018-11-12 21:24:50 +0000 |
commit | 87e403aa4f62d7385999041abce5fdadb8741a47 (patch) | |
tree | 50a1ddaec65b06269d32c1455915f0fd4340f41e /lldb/source/Core/SourceManager.cpp | |
parent | e565e5a9621de42e7b82ad50803fe03beafa0334 (diff) | |
download | bcm5719-llvm-87e403aa4f62d7385999041abce5fdadb8741a47.tar.gz bcm5719-llvm-87e403aa4f62d7385999041abce5fdadb8741a47.zip |
Re-land "Extract construction of DataBufferLLVM into FileSystem"
This fixes some UB in isLocal detected by the sanitized bot.
llvm-svn: 346707
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 cda23f5645e..16cc1b805b5 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(); } } |