summaryrefslogtreecommitdiffstats
path: root/lldb/source/Plugins/Language/ObjC/NSError.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'lldb/source/Plugins/Language/ObjC/NSError.cpp')
-rw-r--r--lldb/source/Plugins/Language/ObjC/NSError.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/lldb/source/Plugins/Language/ObjC/NSError.cpp b/lldb/source/Plugins/Language/ObjC/NSError.cpp
index 43ba8b751ea..c627cd03192 100644
--- a/lldb/source/Plugins/Language/ObjC/NSError.cpp
+++ b/lldb/source/Plugins/Language/ObjC/NSError.cpp
@@ -1,4 +1,4 @@
-//===-- NSError.cpp ----------------------------------------------*- C++ -*-===//
+//===-- NSError.cpp ---------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -7,6 +7,12 @@
//
//===----------------------------------------------------------------------===//
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+#include "clang/AST/DeclCXX.h"
+
+// Project includes
#include "Cocoa.h"
#include "lldb/Core/DataBufferHeap.h"
@@ -22,8 +28,6 @@
#include "lldb/Utility/ProcessStructReader.h"
-#include "clang/AST/DeclCXX.h"
-
#include "Plugins/Language/ObjC/NSString.h"
using namespace lldb;
@@ -96,9 +100,12 @@ public:
NSErrorSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) :
SyntheticChildrenFrontEnd(*valobj_sp)
{}
-
- virtual size_t
- CalculateNumChildren ()
+
+ ~NSErrorSyntheticFrontEnd() override = default;
+ // no need to delete m_child_ptr - it's kept alive by the cluster manager on our behalf
+
+ size_t
+ CalculateNumChildren() override
{
if (m_child_ptr)
return 1;
@@ -107,8 +114,8 @@ public:
return 0;
}
- virtual lldb::ValueObjectSP
- GetChildAtIndex (size_t idx)
+ lldb::ValueObjectSP
+ GetChildAtIndex(size_t idx) override
{
if (idx != 0)
return lldb::ValueObjectSP();
@@ -118,8 +125,8 @@ public:
return m_child_sp;
}
- virtual bool
- Update()
+ bool
+ Update() override
{
m_child_ptr = nullptr;
m_child_sp.reset();
@@ -158,27 +165,21 @@ public:
return false;
}
- virtual bool
- MightHaveChildren ()
+ bool
+ MightHaveChildren() override
{
return true;
}
- virtual size_t
- GetIndexOfChildWithName (const ConstString &name)
+ size_t
+ GetIndexOfChildWithName(const ConstString &name) override
{
static ConstString g___userInfo("_userInfo");
if (name == g___userInfo)
return 0;
return UINT32_MAX;
}
-
- virtual
- ~NSErrorSyntheticFrontEnd ()
- {
- // no need to delete m_child_ptr - it's kept alive by the cluster manager on our behalf
- }
-
+
private:
// the child here can be "real" (i.e. an actual child of the root) or synthetized from raw memory
// if the former, I need to store a plain pointer to it - or else a loop of references will cause this entire hierarchy of values to leak
@@ -215,4 +216,3 @@ lldb_private::formatters::NSErrorSyntheticFrontEndCreator (CXXSyntheticChildren*
return nullptr;
}
-
OpenPOWER on IntegriCloud