[Lldb-commits] [lldb] ea2ba51 - [lldb][NFC] Simplify IOHandler constructor/destructor setup
Raphael Isemann via lldb-commits
lldb-commits at lists.llvm.org
Thu Nov 14 00:59:46 PST 2019
Author: Raphael Isemann
Date: 2019-11-14T09:59:00+01:00
New Revision: ea2ba51b0b2f5bc0bea650bf64e5cbd63476563f
URL: https://github.com/llvm/llvm-project/commit/ea2ba51b0b2f5bc0bea650bf64e5cbd63476563f
DIFF: https://github.com/llvm/llvm-project/commit/ea2ba51b0b2f5bc0bea650bf64e5cbd63476563f.diff
LOG: [lldb][NFC] Simplify IOHandler constructor/destructor setup
We only need a default constructor because of DISALLOW_COPY_AND_ASSIGN,
but the non-virtual destructor isn't needed.
Added:
Modified:
lldb/include/lldb/Core/IOHandler.h
Removed:
################################################################################
diff --git a/lldb/include/lldb/Core/IOHandler.h b/lldb/include/lldb/Core/IOHandler.h
index 37142a5a8396..04b94da3a8c1 100644
--- a/lldb/include/lldb/Core/IOHandler.h
+++ b/lldb/include/lldb/Core/IOHandler.h
@@ -495,9 +495,7 @@ class IOHandlerCursesValueObjectList : public IOHandler {
class IOHandlerStack {
public:
- IOHandlerStack() : m_stack(), m_mutex(), m_top(nullptr) {}
-
- ~IOHandlerStack() = default;
+ IOHandlerStack() = default;
size_t GetSize() const {
std::lock_guard<std::recursive_mutex> guard(m_mutex);
@@ -574,7 +572,7 @@ class IOHandlerStack {
typedef std::vector<lldb::IOHandlerSP> collection;
collection m_stack;
mutable std::recursive_mutex m_mutex;
- IOHandler *m_top;
+ IOHandler *m_top = nullptr;
private:
DISALLOW_COPY_AND_ASSIGN(IOHandlerStack);
More information about the lldb-commits
mailing list