diff options
Diffstat (limited to 'lldb/source/Host/common')
-rw-r--r-- | lldb/source/Host/common/FileSystem.cpp | 6 | ||||
-rw-r--r-- | lldb/source/Host/common/Host.cpp | 9 |
2 files changed, 8 insertions, 7 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/common/Host.cpp b/lldb/source/Host/common/Host.cpp index 5992b54..510f9c7 100644 --- a/lldb/source/Host/common/Host.cpp +++ b/lldb/source/Host/common/Host.cpp @@ -82,10 +82,11 @@ int __pthread_fchdir(int fildes); using namespace lldb; using namespace lldb_private; -#if !defined(__APPLE__) -// The system log is currently only meaningful on Darwin, where this means -// os_log. The meaning of a "system log" isn't as clear on other platforms, and -// therefore we don't providate a default implementation. Vendors are free to +#if !defined(__APPLE__) && !defined(_WIN32) +// The system log is currently only meaningful on Darwin and Windows. +// On Darwin, this means os_log. On Windows this means Events Viewer. +// The meaning of a "system log" isn't as clear on other platforms, and +// therefore we don't providate a default implementation. Vendors are free // to implement this function if they have a use for it. void Host::SystemLog(Severity severity, llvm::StringRef message) {} #endif |