diff options
Diffstat (limited to 'lldb/source/Host')
-rw-r--r-- | lldb/source/Host/common/FileSystem.cpp | 6 | ||||
-rw-r--r-- | lldb/source/Host/windows/MainLoopWindows.cpp | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/lldb/source/Host/common/FileSystem.cpp b/lldb/source/Host/common/FileSystem.cpp index 5153a0a9..00919fe 100644 --- a/lldb/source/Host/common/FileSystem.cpp +++ b/lldb/source/Host/common/FileSystem.cpp @@ -35,6 +35,7 @@ #include <algorithm> #include <fstream> +#include <memory> #include <optional> #include <vector> @@ -288,8 +289,7 @@ FileSystem::CreateWritableDataBuffer(const llvm::Twine &path, uint64_t size, is_volatile); if (!buffer) return {}; - return std::shared_ptr<WritableDataBufferLLVM>( - new WritableDataBufferLLVM(std::move(buffer))); + return std::make_shared<WritableDataBufferLLVM>(std::move(buffer)); } std::shared_ptr<DataBuffer> @@ -300,7 +300,7 @@ FileSystem::CreateDataBuffer(const llvm::Twine &path, uint64_t size, GetMemoryBuffer<llvm::MemoryBuffer>(path, size, offset, is_volatile); if (!buffer) return {}; - return std::shared_ptr<DataBufferLLVM>(new DataBufferLLVM(std::move(buffer))); + return std::make_shared<DataBufferLLVM>(std::move(buffer)); } std::shared_ptr<WritableDataBuffer> diff --git a/lldb/source/Host/windows/MainLoopWindows.cpp b/lldb/source/Host/windows/MainLoopWindows.cpp index c1a0182..c0b1079 100644 --- a/lldb/source/Host/windows/MainLoopWindows.cpp +++ b/lldb/source/Host/windows/MainLoopWindows.cpp @@ -223,7 +223,7 @@ MainLoopWindows::RegisterReadObject(const IOObjectSP &object_sp, if (m_read_fds.find(waitable_handle) != m_read_fds.end()) { error = Status::FromErrorStringWithFormat( - "File descriptor %d already monitored.", waitable_handle); + "File descriptor %p already monitored.", waitable_handle); return nullptr; } @@ -235,7 +235,7 @@ MainLoopWindows::RegisterReadObject(const IOObjectSP &object_sp, } else { DWORD file_type = GetFileType(waitable_handle); if (file_type != FILE_TYPE_PIPE) { - error = Status::FromErrorStringWithFormat("Unsupported file type %d", + error = Status::FromErrorStringWithFormat("Unsupported file type %ld", file_type); return nullptr; } |