diff options
Diffstat (limited to 'source/Interpreter/OptionValueFileSpec.cpp')
| -rw-r--r-- | source/Interpreter/OptionValueFileSpec.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/source/Interpreter/OptionValueFileSpec.cpp b/source/Interpreter/OptionValueFileSpec.cpp index a6eb5375851d..0df581af5d67 100644 --- a/source/Interpreter/OptionValueFileSpec.cpp +++ b/source/Interpreter/OptionValueFileSpec.cpp @@ -15,6 +15,7 @@ #include "lldb/Interpreter/Args.h" #include "lldb/Interpreter/CommandCompletions.h" #include "lldb/Interpreter/CommandInterpreter.h" +#include "lldb/Utility/DataBufferLLVM.h" using namespace lldb; using namespace lldb_private; @@ -118,10 +119,8 @@ OptionValueFileSpec::GetFileContents(bool null_terminate) { const auto file_mod_time = FileSystem::GetModificationTime(m_current_value); if (m_data_sp && m_data_mod_time == file_mod_time) return m_data_sp; - if (null_terminate) - m_data_sp = m_current_value.ReadFileContentsAsCString(); - else - m_data_sp = m_current_value.ReadFileContents(); + m_data_sp = DataBufferLLVM::CreateFromPath(m_current_value.GetPath(), + null_terminate); m_data_mod_time = file_mod_time; } return m_data_sp; |
