summaryrefslogtreecommitdiffstats
path: root/lldb/source/Core/SourceManager.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Core/SourceManager.cpp')
-rw-r--r--lldb/source/Core/SourceManager.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/lldb/source/Core/SourceManager.cpp b/lldb/source/Core/SourceManager.cpp
index d4101ab7f43..3a7e4e969ba 100644
--- a/lldb/source/Core/SourceManager.cpp
+++ b/lldb/source/Core/SourceManager.cpp
@@ -22,6 +22,7 @@
#include "lldb/Target/Target.h"
#include "lldb/Utility/AnsiTerminal.h"
#include "lldb/Utility/DataBuffer.h"
+#include "lldb/Utility/DataBufferLLVM.h"
#include "lldb/Utility/RegularExpression.h"
#include "lldb/Utility/Stream.h"
@@ -404,7 +405,7 @@ void SourceManager::File::CommonInitializer(const FileSpec &file_spec,
}
if (m_mod_time != llvm::sys::TimePoint<>())
- m_data_sp = m_file_spec.ReadFileContents();
+ m_data_sp = DataBufferLLVM::CreateFromPath(m_file_spec.GetPath());
}
uint32_t SourceManager::File::GetLineOffset(uint32_t line) {
@@ -482,7 +483,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 = m_file_spec.ReadFileContents();
+ m_data_sp = DataBufferLLVM::CreateFromPath(m_file_spec.GetPath());
m_offsets.clear();
}
}
OpenPOWER on IntegriCloud