diff options
Diffstat (limited to 'lldb/source/Host/common')
-rw-r--r-- | lldb/source/Host/common/File.cpp | 2 | ||||
-rw-r--r-- | lldb/source/Host/common/FileSpec.cpp | 5 | ||||
-rw-r--r-- | lldb/source/Host/common/Host.cpp | 4 |
3 files changed, 5 insertions, 6 deletions
diff --git a/lldb/source/Host/common/File.cpp b/lldb/source/Host/common/File.cpp index ae0bf887974..f818123c296 100644 --- a/lldb/source/Host/common/File.cpp +++ b/lldb/source/Host/common/File.cpp @@ -556,7 +556,7 @@ File::Read (size_t &num_bytes, off_t &offset, bool null_terminate, DataBufferSP if (num_bytes > bytes_left) num_bytes = bytes_left; - std::auto_ptr<DataBufferHeap> data_heap_ap; + STD_UNIQUE_PTR(DataBufferHeap) data_heap_ap; data_heap_ap.reset(new DataBufferHeap(num_bytes + (null_terminate ? 1 : 0), '\0')); if (data_heap_ap.get()) diff --git a/lldb/source/Host/common/FileSpec.cpp b/lldb/source/Host/common/FileSpec.cpp index c8cb96cc565..fab7ea1eccb 100644 --- a/lldb/source/Host/common/FileSpec.cpp +++ b/lldb/source/Host/common/FileSpec.cpp @@ -35,7 +35,6 @@ using namespace lldb; using namespace lldb_private; -using namespace std; static bool GetFileStats (const FileSpec *file_spec, struct stat *stats_ptr) @@ -745,7 +744,7 @@ DataBufferSP FileSpec::MemoryMapFileContents(off_t file_offset, size_t file_size) const { DataBufferSP data_sp; - auto_ptr<DataBufferMemoryMap> mmap_data(new DataBufferMemoryMap()); + STD_UNIQUE_PTR(DataBufferMemoryMap) mmap_data(new DataBufferMemoryMap()); if (mmap_data.get()) { if (mmap_data->MemoryMapFromFileSpec (this, file_offset, file_size) >= file_size) @@ -863,7 +862,7 @@ FileSpec::ReadFileLines (STLStringArray &lines) char path[PATH_MAX]; if (GetPath(path, sizeof(path))) { - ifstream file_stream (path); + std::ifstream file_stream (path); if (file_stream) { diff --git a/lldb/source/Host/common/Host.cpp b/lldb/source/Host/common/Host.cpp index 61386b5833b..90de94cf10c 100644 --- a/lldb/source/Host/common/Host.cpp +++ b/lldb/source/Host/common/Host.cpp @@ -1313,7 +1313,7 @@ Host::RunShellCommand (const char *command, } // The process monitor callback will delete the 'shell_info_ptr' below... - std::auto_ptr<ShellInfo> shell_info_ap (new ShellInfo()); + STD_UNIQUE_PTR(ShellInfo) shell_info_ap (new ShellInfo()); const bool monitor_signals = false; launch_info.SetMonitorProcessCallback(MonitorShellCommand, shell_info_ap.get(), monitor_signals); @@ -1324,7 +1324,7 @@ Host::RunShellCommand (const char *command, { // The process successfully launched, so we can defer ownership of // "shell_info" to the MonitorShellCommand callback function that will - // get called when the process dies. We release the std::auto_ptr as it + // get called when the process dies. We release the unique pointer as it // doesn't need to delete the ShellInfo anymore. ShellInfo *shell_info = shell_info_ap.release(); TimeValue timeout_time(TimeValue::Now()); |