diff options
| author | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:04:10 +0000 | 
|---|---|---|
| committer | Dimitry Andric <dim@FreeBSD.org> | 2017-04-16 16:04:10 +0000 | 
| commit | 74a628f776edb588bff8f8f5cc16eac947c9d631 (patch) | |
| tree | dc32e010ac4902621e5a279bfeb48628f7f0e166 /source/Interpreter/OptionValueFileSpec.cpp | |
| parent | afed7be32164a598f8172282c249af7266c48b46 (diff) | |
Notes
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 a6eb5375851d7..0df581af5d67b 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;  | 
