[Lldb-commits] [lldb] r250789 - Fix Clang-tidy modernize-use-override warnings in source/Plugins/Language; other minor fixes.
Eugene Zelenko via lldb-commits
lldb-commits at lists.llvm.org
Mon Oct 19 18:10:59 PDT 2015
Author: eugenezelenko
Date: Mon Oct 19 20:10:59 2015
New Revision: 250789
URL: http://llvm.org/viewvc/llvm-project?rev=250789&view=rev
Log:
Fix Clang-tidy modernize-use-override warnings in source/Plugins/Language; other minor fixes.
Differential Revision: http://reviews.llvm.org/D13876
Modified:
lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h
lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp
lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxList.cpp
lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp
lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp
lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp
lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp
lldb/trunk/source/Plugins/Language/ObjC/NSArray.cpp
lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp
lldb/trunk/source/Plugins/Language/ObjC/NSIndexPath.cpp
lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp
lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.cpp
lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.h
lldb/trunk/source/Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.h
Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h?rev=250789&r1=250788&r2=250789&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h (original)
+++ lldb/trunk/source/Plugins/Language/CPlusPlus/CPlusPlusLanguage.h Mon Oct 19 20:10:59 2015
@@ -1,4 +1,4 @@
-//===-- CPlusPlusLanguage.h ----------------------------------------*- C++ -*-===//
+//===-- CPlusPlusLanguage.h -------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -116,10 +116,10 @@ public:
bool m_parse_error;
};
- virtual ~CPlusPlusLanguage() = default;
-
- CPlusPlusLanguage () = default;
-
+ CPlusPlusLanguage() = default;
+
+ ~CPlusPlusLanguage() override = default;
+
lldb::LanguageType
GetLanguageType () const override
{
@@ -171,17 +171,16 @@ public:
static uint32_t
FindEquivalentNames(ConstString type_name, std::vector<ConstString>& equivalents);
-
//------------------------------------------------------------------
// PluginInterface protocol
//------------------------------------------------------------------
- virtual ConstString
+ ConstString
GetPluginName() override;
- virtual uint32_t
+ uint32_t
GetPluginVersion() override;
};
} // namespace lldb_private
-#endif // liblldb_CPlusPlusLanguage_h_
+#endif // liblldb_CPlusPlusLanguage_h_
Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp?rev=250789&r1=250788&r2=250789&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp (original)
+++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxInitializerList.cpp Mon Oct 19 20:10:59 2015
@@ -1,4 +1,4 @@
-//===-- LibCxxInitializerList.cpp ----------------------------------*- C++ -*-===//
+//===-- LibCxxInitializerList.cpp -------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -7,6 +7,10 @@
//
//===----------------------------------------------------------------------===//
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
#include "LibCxx.h"
#include "lldb/Core/ConstString.h"
@@ -23,24 +27,24 @@ namespace lldb_private {
{
public:
LibcxxInitializerListSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp);
+
+ ~LibcxxInitializerListSyntheticFrontEnd() override;
+
+ size_t
+ CalculateNumChildren() override;
- virtual size_t
- CalculateNumChildren ();
-
- virtual lldb::ValueObjectSP
- GetChildAtIndex (size_t idx);
+ lldb::ValueObjectSP
+ GetChildAtIndex(size_t idx) override;
- virtual bool
- Update();
+ bool
+ Update() override;
- virtual bool
- MightHaveChildren ();
+ bool
+ MightHaveChildren() override;
- virtual size_t
- GetIndexOfChildWithName (const ConstString &name);
+ size_t
+ GetIndexOfChildWithName(const ConstString &name) override;
- virtual
- ~LibcxxInitializerListSyntheticFrontEnd ();
private:
ValueObject* m_start;
CompilerType m_element_type;
@@ -48,8 +52,8 @@ namespace lldb_private {
size_t m_num_elements;
std::map<size_t,lldb::ValueObjectSP> m_children;
};
- }
-}
+ } // namespace formatters
+} // namespace lldb_private
lldb_private::formatters::LibcxxInitializerListSyntheticFrontEnd::LibcxxInitializerListSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) :
SyntheticChildrenFrontEnd(*valobj_sp.get()),
@@ -63,6 +67,12 @@ m_children()
Update();
}
+lldb_private::formatters::LibcxxInitializerListSyntheticFrontEnd::~LibcxxInitializerListSyntheticFrontEnd()
+{
+ // this needs to stay around because it's a child object who will follow its parent's life cycle
+ // delete m_start;
+}
+
size_t
lldb_private::formatters::LibcxxInitializerListSyntheticFrontEnd::CalculateNumChildren ()
{
@@ -128,12 +138,6 @@ lldb_private::formatters::LibcxxInitiali
return ExtractIndexFromString(name.GetCString());
}
-lldb_private::formatters::LibcxxInitializerListSyntheticFrontEnd::~LibcxxInitializerListSyntheticFrontEnd ()
-{
- // this needs to stay around because it's a child object who will follow its parent's life cycle
- // delete m_start;
-}
-
lldb_private::SyntheticChildrenFrontEnd*
lldb_private::formatters::LibcxxInitializerListSyntheticFrontEndCreator (CXXSyntheticChildren*, lldb::ValueObjectSP valobj_sp)
{
@@ -141,4 +145,3 @@ lldb_private::formatters::LibcxxInitiali
return NULL;
return (new LibcxxInitializerListSyntheticFrontEnd(valobj_sp));
}
-
Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxList.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxList.cpp?rev=250789&r1=250788&r2=250789&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxList.cpp (original)
+++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxList.cpp Mon Oct 19 20:10:59 2015
@@ -1,4 +1,4 @@
-//===-- LibCxxList.cpp -------------------------------------------*- C++ -*-===//
+//===-- LibCxxList.cpp ------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -7,6 +7,10 @@
//
//===----------------------------------------------------------------------===//
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
#include "LibCxx.h"
#include "lldb/Core/DataBufferHeap.h"
@@ -29,24 +33,24 @@ namespace lldb_private {
{
public:
LibcxxStdListSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp);
+
+ ~LibcxxStdListSyntheticFrontEnd() override = default;
+
+ size_t
+ CalculateNumChildren() override;
- virtual size_t
- CalculateNumChildren ();
-
- virtual lldb::ValueObjectSP
- GetChildAtIndex (size_t idx);
+ lldb::ValueObjectSP
+ GetChildAtIndex(size_t idx) override;
- virtual bool
- Update();
+ bool
+ Update() override;
- virtual bool
- MightHaveChildren ();
+ bool
+ MightHaveChildren() override;
- virtual size_t
- GetIndexOfChildWithName (const ConstString &name);
+ size_t
+ GetIndexOfChildWithName(const ConstString &name) override;
- virtual
- ~LibcxxStdListSyntheticFrontEnd ();
private:
bool
HasLoop(size_t);
@@ -61,13 +65,13 @@ namespace lldb_private {
size_t m_count;
std::map<size_t,lldb::ValueObjectSP> m_children;
};
- }
-}
+ } // namespace formatters
+} // namespace lldb_private
class ListEntry
{
public:
- ListEntry () {}
+ ListEntry() = default;
ListEntry (ValueObjectSP entry_sp) : m_entry_sp(entry_sp) {}
ListEntry (const ListEntry& rhs) : m_entry_sp(rhs.m_entry_sp) {}
ListEntry (ValueObject* entry) : m_entry_sp(entry ? entry->GetSP() : ValueObjectSP()) {}
@@ -132,7 +136,7 @@ private:
class ListIterator
{
public:
- ListIterator () {}
+ ListIterator() = default;
ListIterator (ListEntry entry) : m_entry(entry) {}
ListIterator (ValueObjectSP entry) : m_entry(entry) {}
ListIterator (const ListIterator& rhs) : m_entry(rhs.m_entry) {}
@@ -182,6 +186,7 @@ protected:
{
m_entry = m_entry.prev();
}
+
private:
ListEntry m_entry;
};
@@ -357,9 +362,6 @@ lldb_private::formatters::LibcxxStdListS
return ExtractIndexFromString(name.GetCString());
}
-lldb_private::formatters::LibcxxStdListSyntheticFrontEnd::~LibcxxStdListSyntheticFrontEnd ()
-{}
-
SyntheticChildrenFrontEnd*
lldb_private::formatters::LibcxxStdListSyntheticFrontEndCreator (CXXSyntheticChildren*, lldb::ValueObjectSP valobj_sp)
{
@@ -367,4 +369,3 @@ lldb_private::formatters::LibcxxStdListS
return NULL;
return (new LibcxxStdListSyntheticFrontEnd(valobj_sp));
}
-
Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp?rev=250789&r1=250788&r2=250789&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp (original)
+++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxMap.cpp Mon Oct 19 20:10:59 2015
@@ -1,4 +1,4 @@
-//===-- LibCxxList.cpp -------------------------------------------*- C++ -*-===//
+//===-- LibCxxList.cpp ------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -7,6 +7,10 @@
//
//===----------------------------------------------------------------------===//
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
#include "LibCxx.h"
#include "lldb/Core/DataBufferHeap.h"
@@ -29,24 +33,24 @@ namespace lldb_private {
{
public:
LibcxxStdMapSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp);
+
+ ~LibcxxStdMapSyntheticFrontEnd() override = default;
+
+ size_t
+ CalculateNumChildren() override;
- virtual size_t
- CalculateNumChildren ();
-
- virtual lldb::ValueObjectSP
- GetChildAtIndex (size_t idx);
+ lldb::ValueObjectSP
+ GetChildAtIndex(size_t idx) override;
- virtual bool
- Update();
+ bool
+ Update() override;
- virtual bool
- MightHaveChildren ();
+ bool
+ MightHaveChildren() override;
- virtual size_t
- GetIndexOfChildWithName (const ConstString &name);
+ size_t
+ GetIndexOfChildWithName(const ConstString &name) override;
- virtual
- ~LibcxxStdMapSyntheticFrontEnd ();
private:
bool
GetDataType();
@@ -61,13 +65,13 @@ namespace lldb_private {
size_t m_count;
std::map<size_t,lldb::ValueObjectSP> m_children;
};
- }
-}
+ } // namespace formatters
+} // namespace lldb_private
class MapEntry
{
public:
- MapEntry () {}
+ MapEntry() = default;
explicit MapEntry (ValueObjectSP entry_sp) : m_entry_sp(entry_sp) {}
MapEntry (const MapEntry& rhs) : m_entry_sp(rhs.m_entry_sp) {}
explicit MapEntry (ValueObject* entry) : m_entry_sp(entry ? entry->GetSP() : ValueObjectSP()) {}
@@ -146,7 +150,7 @@ private:
class MapIterator
{
public:
- MapIterator () {}
+ MapIterator() = default;
MapIterator (MapEntry entry, size_t depth = 0) : m_entry(entry), m_max_depth(depth), m_error(false) {}
MapIterator (ValueObjectSP entry, size_t depth = 0) : m_entry(entry), m_max_depth(depth), m_error(false) {}
MapIterator (const MapIterator& rhs) : m_entry(rhs.m_entry),m_max_depth(rhs.m_max_depth), m_error(false) {}
@@ -176,6 +180,7 @@ public:
}
return m_entry.GetEntry();
}
+
protected:
void
next ()
@@ -440,9 +445,6 @@ lldb_private::formatters::LibcxxStdMapSy
return ExtractIndexFromString(name.GetCString());
}
-lldb_private::formatters::LibcxxStdMapSyntheticFrontEnd::~LibcxxStdMapSyntheticFrontEnd ()
-{}
-
SyntheticChildrenFrontEnd*
lldb_private::formatters::LibcxxStdMapSyntheticFrontEndCreator (CXXSyntheticChildren*, lldb::ValueObjectSP valobj_sp)
{
Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp?rev=250789&r1=250788&r2=250789&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp (original)
+++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxUnorderedMap.cpp Mon Oct 19 20:10:59 2015
@@ -1,4 +1,4 @@
-//===-- LibCxxUnorderedMap.cpp -----------------------------------*- C++ -*-===//
+//===-- LibCxxUnorderedMap.cpp ----------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -7,6 +7,10 @@
//
//===----------------------------------------------------------------------===//
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
#include "LibCxx.h"
#include "lldb/Core/DataBufferHeap.h"
@@ -29,34 +33,33 @@ namespace lldb_private {
{
public:
LibcxxStdUnorderedMapSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp);
+
+ ~LibcxxStdUnorderedMapSyntheticFrontEnd() override = default;
+
+ size_t
+ CalculateNumChildren() override;
- virtual size_t
- CalculateNumChildren ();
-
- virtual lldb::ValueObjectSP
- GetChildAtIndex (size_t idx);
-
- virtual bool
- Update();
+ lldb::ValueObjectSP
+ GetChildAtIndex(size_t idx) override;
- virtual bool
- MightHaveChildren ();
+ bool
+ Update() override;
- virtual size_t
- GetIndexOfChildWithName (const ConstString &name);
+ bool
+ MightHaveChildren() override;
- virtual
- ~LibcxxStdUnorderedMapSyntheticFrontEnd ();
+ size_t
+ GetIndexOfChildWithName(const ConstString &name) override;
+
private:
-
ValueObject* m_tree;
size_t m_num_elements;
ValueObject* m_next_element;
std::map<size_t,lldb::ValueObjectSP> m_children;
std::vector<std::pair<ValueObject*, uint64_t> > m_elements_cache;
};
- }
-}
+ } // namespace formatters
+} // namespace lldb_private
lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd::LibcxxStdUnorderedMapSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) :
SyntheticChildrenFrontEnd(*valobj_sp.get()),
@@ -160,9 +163,6 @@ lldb_private::formatters::LibcxxStdUnord
return ExtractIndexFromString(name.GetCString());
}
-lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEnd::~LibcxxStdUnorderedMapSyntheticFrontEnd ()
-{}
-
SyntheticChildrenFrontEnd*
lldb_private::formatters::LibcxxStdUnorderedMapSyntheticFrontEndCreator (CXXSyntheticChildren*, lldb::ValueObjectSP valobj_sp)
{
Modified: lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp?rev=250789&r1=250788&r2=250789&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp (original)
+++ lldb/trunk/source/Plugins/Language/CPlusPlus/LibCxxVector.cpp Mon Oct 19 20:10:59 2015
@@ -1,4 +1,4 @@
-//===-- LibCxxVector.cpp -----------------------------------------*- C++ -*-===//
+//===-- LibCxxVector.cpp ----------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -7,6 +7,10 @@
//
//===----------------------------------------------------------------------===//
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
#include "LibCxx.h"
#include "lldb/Core/ConstString.h"
@@ -23,24 +27,24 @@ namespace lldb_private {
{
public:
LibcxxStdVectorSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp);
+
+ ~LibcxxStdVectorSyntheticFrontEnd() override;
+
+ size_t
+ CalculateNumChildren() override;
- virtual size_t
- CalculateNumChildren ();
-
- virtual lldb::ValueObjectSP
- GetChildAtIndex (size_t idx);
-
- virtual bool
- Update();
+ lldb::ValueObjectSP
+ GetChildAtIndex(size_t idx) override;
- virtual bool
- MightHaveChildren ();
+ bool
+ Update() override;
- virtual size_t
- GetIndexOfChildWithName (const ConstString &name);
+ bool
+ MightHaveChildren() override;
- virtual
- ~LibcxxStdVectorSyntheticFrontEnd ();
+ size_t
+ GetIndexOfChildWithName(const ConstString &name) override;
+
private:
ValueObject* m_start;
ValueObject* m_finish;
@@ -48,8 +52,8 @@ namespace lldb_private {
uint32_t m_element_size;
std::map<size_t,lldb::ValueObjectSP> m_children;
};
- }
-}
+ } // namespace formatters
+} // namespace lldb_private
lldb_private::formatters::LibcxxStdVectorSyntheticFrontEnd::LibcxxStdVectorSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) :
SyntheticChildrenFrontEnd(*valobj_sp.get()),
@@ -63,6 +67,13 @@ m_children()
Update();
}
+lldb_private::formatters::LibcxxStdVectorSyntheticFrontEnd::~LibcxxStdVectorSyntheticFrontEnd()
+{
+ // these need to stay around because they are child objects who will follow their parent's life cycle
+ // delete m_start;
+ // delete m_finish;
+}
+
size_t
lldb_private::formatters::LibcxxStdVectorSyntheticFrontEnd::CalculateNumChildren ()
{
@@ -139,13 +150,6 @@ lldb_private::formatters::LibcxxStdVecto
return ExtractIndexFromString(name.GetCString());
}
-lldb_private::formatters::LibcxxStdVectorSyntheticFrontEnd::~LibcxxStdVectorSyntheticFrontEnd ()
-{
- // these need to stay around because they are child objects who will follow their parent's life cycle
- // delete m_start;
- // delete m_finish;
-}
-
lldb_private::SyntheticChildrenFrontEnd*
lldb_private::formatters::LibcxxStdVectorSyntheticFrontEndCreator (CXXSyntheticChildren*, lldb::ValueObjectSP valobj_sp)
{
@@ -153,4 +157,3 @@ lldb_private::formatters::LibcxxStdVecto
return NULL;
return (new LibcxxStdVectorSyntheticFrontEnd(valobj_sp));
}
-
Modified: lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp?rev=250789&r1=250788&r2=250789&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/Cocoa.cpp Mon Oct 19 20:10:59 2015
@@ -1,4 +1,4 @@
-//===-- Cocoa.cpp -------------------------------------------------*- C++ -*-===//
+//===-- Cocoa.cpp -----------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -7,6 +7,10 @@
//
//===----------------------------------------------------------------------===//
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
#include "Cocoa.h"
#include "lldb/Core/DataBufferHeap.h"
@@ -319,6 +323,7 @@ NSNumber_FormatChar (ValueObject& valobj
value,
suffix.c_str());
}
+
static void
NSNumber_FormatShort (ValueObject& valobj,
Stream& stream,
@@ -342,6 +347,7 @@ NSNumber_FormatShort (ValueObject& valob
value,
suffix.c_str());
}
+
static void
NSNumber_FormatInt (ValueObject& valobj,
Stream& stream,
@@ -365,6 +371,7 @@ NSNumber_FormatInt (ValueObject& valobj,
value,
suffix.c_str());
}
+
static void
NSNumber_FormatLong (ValueObject& valobj,
Stream& stream,
@@ -388,6 +395,7 @@ NSNumber_FormatLong (ValueObject& valobj
value,
suffix.c_str());
}
+
static void
NSNumber_FormatFloat (ValueObject& valobj,
Stream& stream,
@@ -411,6 +419,7 @@ NSNumber_FormatFloat (ValueObject& valob
value,
suffix.c_str());
}
+
static void
NSNumber_FormatDouble (ValueObject& valobj,
Stream& stream,
@@ -745,40 +754,37 @@ public:
{
}
- virtual size_t
- CalculateNumChildren ()
+ ~ObjCClassSyntheticChildrenFrontEnd() override = default;
+
+ size_t
+ CalculateNumChildren() override
{
return 0;
}
- virtual lldb::ValueObjectSP
- GetChildAtIndex (size_t idx)
+ lldb::ValueObjectSP
+ GetChildAtIndex(size_t idx) override
{
return lldb::ValueObjectSP();
}
- virtual bool
- Update()
+ bool
+ Update() override
{
return false;
}
- virtual bool
- MightHaveChildren ()
+ bool
+ MightHaveChildren() override
{
return false;
}
- virtual size_t
- GetIndexOfChildWithName (const ConstString &name)
+ size_t
+ GetIndexOfChildWithName(const ConstString &name) override
{
return UINT32_MAX;
}
-
- virtual
- ~ObjCClassSyntheticChildrenFrontEnd ()
- {
- }
};
SyntheticChildrenFrontEnd*
@@ -944,13 +950,13 @@ lldb_private::formatters::RuntimeSpecifi
}
template bool
-lldb_private::formatters::NSDataSummaryProvider<true> (ValueObject&, Stream&, const TypeSummaryOptions&) ;
+lldb_private::formatters::NSDataSummaryProvider<true> (ValueObject&, Stream&, const TypeSummaryOptions&);
template bool
-lldb_private::formatters::NSDataSummaryProvider<false> (ValueObject&, Stream&, const TypeSummaryOptions&) ;
+lldb_private::formatters::NSDataSummaryProvider<false> (ValueObject&, Stream&, const TypeSummaryOptions&);
template bool
-lldb_private::formatters::ObjCSELSummaryProvider<true> (ValueObject&, Stream&, const TypeSummaryOptions&) ;
+lldb_private::formatters::ObjCSELSummaryProvider<true> (ValueObject&, Stream&, const TypeSummaryOptions&);
template bool
-lldb_private::formatters::ObjCSELSummaryProvider<false> (ValueObject&, Stream&, const TypeSummaryOptions&) ;
+lldb_private::formatters::ObjCSELSummaryProvider<false> (ValueObject&, Stream&, const TypeSummaryOptions&);
Modified: lldb/trunk/source/Plugins/Language/ObjC/NSArray.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/NSArray.cpp?rev=250789&r1=250788&r2=250789&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/ObjC/NSArray.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/NSArray.cpp Mon Oct 19 20:10:59 2015
@@ -7,6 +7,12 @@
//
//===----------------------------------------------------------------------===//
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+#include "clang/AST/ASTContext.h"
+
+// Project includes
#include "Cocoa.h"
#include "lldb/Core/DataBufferHeap.h"
@@ -23,8 +29,6 @@
#include "Plugins/LanguageRuntime/ObjC/AppleObjCRuntime/AppleObjCRuntime.h"
#include "lldb/Target/Target.h"
-#include "clang/AST/ASTContext.h"
-
using namespace lldb;
using namespace lldb_private;
using namespace lldb_private::formatters;
@@ -35,24 +39,23 @@ namespace lldb_private {
{
public:
NSArrayMSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp);
+
+ ~NSArrayMSyntheticFrontEnd() override = default;
+
+ size_t
+ CalculateNumChildren() override;
- virtual size_t
- CalculateNumChildren ();
-
- virtual lldb::ValueObjectSP
- GetChildAtIndex (size_t idx);
-
- virtual bool
- Update() = 0;
+ lldb::ValueObjectSP
+ GetChildAtIndex(size_t idx) override;
- virtual bool
- MightHaveChildren ();
+ bool
+ Update() override = 0;
- virtual size_t
- GetIndexOfChildWithName (const ConstString &name);
+ bool
+ MightHaveChildren() override;
- virtual
- ~NSArrayMSyntheticFrontEnd () {}
+ size_t
+ GetIndexOfChildWithName(const ConstString &name) override;
protected:
virtual lldb::addr_t
@@ -75,6 +78,27 @@ namespace lldb_private {
class NSArrayMSyntheticFrontEnd_109 : public NSArrayMSyntheticFrontEnd
{
+ public:
+ NSArrayMSyntheticFrontEnd_109 (lldb::ValueObjectSP valobj_sp);
+
+ ~NSArrayMSyntheticFrontEnd_109() override;
+
+ bool
+ Update() override;
+
+ protected:
+ lldb::addr_t
+ GetDataAddress() override;
+
+ uint64_t
+ GetUsedCount() override;
+
+ uint64_t
+ GetOffset() override;
+
+ uint64_t
+ GetSize() override;
+
private:
struct DataDescriptor_32
{
@@ -86,6 +110,7 @@ namespace lldb_private {
uint32_t _priv3;
uint32_t _data;
};
+
struct DataDescriptor_64
{
uint64_t _used;
@@ -96,36 +121,35 @@ namespace lldb_private {
uint32_t _priv3;
uint64_t _data;
};
+
+ DataDescriptor_32 *m_data_32;
+ DataDescriptor_64 *m_data_64;
+ };
+
+ class NSArrayMSyntheticFrontEnd_1010 : public NSArrayMSyntheticFrontEnd
+ {
public:
- NSArrayMSyntheticFrontEnd_109 (lldb::ValueObjectSP valobj_sp);
-
- virtual bool
- Update();
-
- virtual
- ~NSArrayMSyntheticFrontEnd_109 ();
+ NSArrayMSyntheticFrontEnd_1010 (lldb::ValueObjectSP valobj_sp);
+
+ ~NSArrayMSyntheticFrontEnd_1010() override;
+
+ bool
+ Update() override;
protected:
- virtual lldb::addr_t
- GetDataAddress ();
+ lldb::addr_t
+ GetDataAddress() override;
- virtual uint64_t
- GetUsedCount ();
+ uint64_t
+ GetUsedCount() override;
- virtual uint64_t
- GetOffset ();
+ uint64_t
+ GetOffset() override;
- virtual uint64_t
- GetSize ();
+ uint64_t
+ GetSize() override;
private:
- DataDescriptor_32 *m_data_32;
- DataDescriptor_64 *m_data_64;
- };
-
- class NSArrayMSyntheticFrontEnd_1010 : public NSArrayMSyntheticFrontEnd
- {
- private:
struct DataDescriptor_32
{
uint32_t _used;
@@ -135,6 +159,7 @@ namespace lldb_private {
uint32_t _priv2;
uint32_t _data;
};
+
struct DataDescriptor_64
{
uint64_t _used;
@@ -144,29 +169,7 @@ namespace lldb_private {
uint32_t _priv2;
uint64_t _data;
};
- public:
- NSArrayMSyntheticFrontEnd_1010 (lldb::ValueObjectSP valobj_sp);
-
- virtual bool
- Update();
-
- virtual
- ~NSArrayMSyntheticFrontEnd_1010 ();
-
- protected:
- virtual lldb::addr_t
- GetDataAddress ();
-
- virtual uint64_t
- GetUsedCount ();
-
- virtual uint64_t
- GetOffset ();
-
- virtual uint64_t
- GetSize ();
-
- private:
+
DataDescriptor_32 *m_data_32;
DataDescriptor_64 *m_data_64;
};
@@ -175,24 +178,24 @@ namespace lldb_private {
{
public:
NSArrayISyntheticFrontEnd (lldb::ValueObjectSP valobj_sp);
+
+ ~NSArrayISyntheticFrontEnd() override = default;
+
+ size_t
+ CalculateNumChildren() override;
- virtual size_t
- CalculateNumChildren ();
-
- virtual lldb::ValueObjectSP
- GetChildAtIndex (size_t idx);
-
- virtual bool
- Update();
+ lldb::ValueObjectSP
+ GetChildAtIndex(size_t idx) override;
- virtual bool
- MightHaveChildren ();
+ bool
+ Update() override;
- virtual size_t
- GetIndexOfChildWithName (const ConstString &name);
+ bool
+ MightHaveChildren() override;
- virtual
- ~NSArrayISyntheticFrontEnd ();
+ size_t
+ GetIndexOfChildWithName(const ConstString &name) override;
+
private:
ExecutionContextRef m_exe_ctx_ref;
uint8_t m_ptr_size;
@@ -206,52 +209,49 @@ namespace lldb_private {
{
public:
NSArray0SyntheticFrontEnd (lldb::ValueObjectSP valobj_sp);
+
+ ~NSArray0SyntheticFrontEnd() override = default;
+
+ size_t
+ CalculateNumChildren() override;
- virtual size_t
- CalculateNumChildren ();
-
- virtual lldb::ValueObjectSP
- GetChildAtIndex (size_t idx);
-
- virtual bool
- Update();
+ lldb::ValueObjectSP
+ GetChildAtIndex(size_t idx) override;
- virtual bool
- MightHaveChildren ();
+ bool
+ Update() override;
- virtual size_t
- GetIndexOfChildWithName (const ConstString &name);
+ bool
+ MightHaveChildren() override;
- virtual
- ~NSArray0SyntheticFrontEnd ();
- private:
+ size_t
+ GetIndexOfChildWithName(const ConstString &name) override;
};
class NSArrayCodeRunningSyntheticFrontEnd : public SyntheticChildrenFrontEnd
{
public:
NSArrayCodeRunningSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp);
+
+ ~NSArrayCodeRunningSyntheticFrontEnd() override = default;
+
+ size_t
+ CalculateNumChildren() override;
- virtual size_t
- CalculateNumChildren ();
-
- virtual lldb::ValueObjectSP
- GetChildAtIndex (size_t idx);
-
- virtual bool
- Update();
+ lldb::ValueObjectSP
+ GetChildAtIndex(size_t idx) override;
- virtual bool
- MightHaveChildren ();
+ bool
+ Update() override;
- virtual size_t
- GetIndexOfChildWithName (const ConstString &name);
+ bool
+ MightHaveChildren() override;
- virtual
- ~NSArrayCodeRunningSyntheticFrontEnd ();
+ size_t
+ GetIndexOfChildWithName(const ConstString &name) override;
};
- }
-}
+ } // namespace formatters
+} // namespace lldb_private
bool
lldb_private::formatters::NSArraySummaryProvider (ValueObject& valobj, Stream& stream, const TypeSummaryOptions& options)
@@ -480,6 +480,14 @@ lldb_private::formatters::NSArrayMSynthe
return idx;
}
+lldb_private::formatters::NSArrayMSyntheticFrontEnd_109::~NSArrayMSyntheticFrontEnd_109()
+{
+ delete m_data_32;
+ m_data_32 = NULL;
+ delete m_data_64;
+ m_data_64 = NULL;
+}
+
lldb::addr_t
lldb_private::formatters::NSArrayMSyntheticFrontEnd_109::GetDataAddress ()
{
@@ -516,7 +524,7 @@ lldb_private::formatters::NSArrayMSynthe
m_data_64->_size;
}
-lldb_private::formatters::NSArrayMSyntheticFrontEnd_109::~NSArrayMSyntheticFrontEnd_109 ()
+lldb_private::formatters::NSArrayMSyntheticFrontEnd_1010::~NSArrayMSyntheticFrontEnd_1010()
{
delete m_data_32;
m_data_32 = NULL;
@@ -560,14 +568,6 @@ lldb_private::formatters::NSArrayMSynthe
m_data_64->_size;
}
-lldb_private::formatters::NSArrayMSyntheticFrontEnd_1010::~NSArrayMSyntheticFrontEnd_1010 ()
-{
- delete m_data_32;
- m_data_32 = NULL;
- delete m_data_64;
- m_data_64 = NULL;
-}
-
lldb_private::formatters::NSArrayISyntheticFrontEnd::NSArrayISyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) :
SyntheticChildrenFrontEnd (*valobj_sp.get()),
m_exe_ctx_ref (),
@@ -587,10 +587,6 @@ m_data_ptr (0)
}
}
-lldb_private::formatters::NSArrayISyntheticFrontEnd::~NSArrayISyntheticFrontEnd ()
-{
-}
-
size_t
lldb_private::formatters::NSArrayISyntheticFrontEnd::GetIndexOfChildWithName (const ConstString &name)
{
@@ -666,10 +662,6 @@ SyntheticChildrenFrontEnd (*valobj_sp.ge
{
}
-lldb_private::formatters::NSArray0SyntheticFrontEnd::~NSArray0SyntheticFrontEnd ()
-{
-}
-
size_t
lldb_private::formatters::NSArray0SyntheticFrontEnd::GetIndexOfChildWithName (const ConstString &name)
{
@@ -798,6 +790,3 @@ lldb_private::formatters::NSArrayCodeRun
{
return 0;
}
-
-lldb_private::formatters::NSArrayCodeRunningSyntheticFrontEnd::~NSArrayCodeRunningSyntheticFrontEnd ()
-{}
Modified: lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp?rev=250789&r1=250788&r2=250789&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/NSDictionary.cpp Mon Oct 19 20:10:59 2015
@@ -1,4 +1,4 @@
-//===-- NSDictionary.cpp ------------------------------------------*- C++ -*-===//
+//===-- NSDictionary.cpp ----------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -7,6 +7,14 @@
//
//===----------------------------------------------------------------------===//
+// C Includes
+// C++ Includes
+#include <mutex>
+
+// Other libraries and framework includes
+#include "clang/AST/DeclCXX.h"
+
+// Project includes
#include "NSDictionary.h"
#include "lldb/Core/DataBufferHeap.h"
@@ -21,10 +29,6 @@
#include "lldb/Target/ObjCLanguageRuntime.h"
#include "lldb/Target/Target.h"
-#include "clang/AST/DeclCXX.h"
-
-#include <mutex>
-
using namespace lldb;
using namespace lldb_private;
using namespace lldb_private::formatters;
@@ -77,46 +81,46 @@ namespace lldb_private {
namespace formatters {
class NSDictionaryISyntheticFrontEnd : public SyntheticChildrenFrontEnd
{
+ public:
+ NSDictionaryISyntheticFrontEnd (lldb::ValueObjectSP valobj_sp);
+
+ ~NSDictionaryISyntheticFrontEnd() override;
+
+ size_t
+ CalculateNumChildren() override;
+
+ lldb::ValueObjectSP
+ GetChildAtIndex(size_t idx) override;
+
+ bool
+ Update() override;
+
+ bool
+ MightHaveChildren() override;
+
+ size_t
+ GetIndexOfChildWithName(const ConstString &name) override;
+
private:
struct DataDescriptor_32
{
uint32_t _used : 26;
uint32_t _szidx : 6;
};
+
struct DataDescriptor_64
{
uint64_t _used : 58;
uint32_t _szidx : 6;
};
-
+
struct DictionaryItemDescriptor
{
lldb::addr_t key_ptr;
lldb::addr_t val_ptr;
lldb::ValueObjectSP valobj_sp;
};
-
- public:
- NSDictionaryISyntheticFrontEnd (lldb::ValueObjectSP valobj_sp);
-
- virtual size_t
- CalculateNumChildren ();
-
- virtual lldb::ValueObjectSP
- GetChildAtIndex (size_t idx);
-
- virtual bool
- Update();
-
- virtual bool
- MightHaveChildren ();
-
- virtual size_t
- GetIndexOfChildWithName (const ConstString &name);
-
- virtual
- ~NSDictionaryISyntheticFrontEnd ();
- private:
+
ExecutionContextRef m_exe_ctx_ref;
uint8_t m_ptr_size;
lldb::ByteOrder m_order;
@@ -129,6 +133,26 @@ namespace lldb_private {
class NSDictionaryMSyntheticFrontEnd : public SyntheticChildrenFrontEnd
{
+ public:
+ NSDictionaryMSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp);
+
+ ~NSDictionaryMSyntheticFrontEnd() override;
+
+ size_t
+ CalculateNumChildren() override;
+
+ lldb::ValueObjectSP
+ GetChildAtIndex(size_t idx) override;
+
+ bool
+ Update() override;
+
+ bool
+ MightHaveChildren() override;
+
+ size_t
+ GetIndexOfChildWithName(const ConstString &name) override;
+
private:
struct DataDescriptor_32
{
@@ -139,6 +163,7 @@ namespace lldb_private {
uint32_t _objs_addr;
uint32_t _keys_addr;
};
+
struct DataDescriptor_64
{
uint64_t _used : 58;
@@ -148,33 +173,14 @@ namespace lldb_private {
uint64_t _objs_addr;
uint64_t _keys_addr;
};
+
struct DictionaryItemDescriptor
{
lldb::addr_t key_ptr;
lldb::addr_t val_ptr;
lldb::ValueObjectSP valobj_sp;
};
- public:
- NSDictionaryMSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp);
-
- virtual size_t
- CalculateNumChildren ();
-
- virtual lldb::ValueObjectSP
- GetChildAtIndex (size_t idx);
-
- virtual bool
- Update();
-
- virtual bool
- MightHaveChildren ();
-
- virtual size_t
- GetIndexOfChildWithName (const ConstString &name);
-
- virtual
- ~NSDictionaryMSyntheticFrontEnd ();
- private:
+
ExecutionContextRef m_exe_ctx_ref;
uint8_t m_ptr_size;
lldb::ByteOrder m_order;
@@ -188,27 +194,26 @@ namespace lldb_private {
{
public:
NSDictionaryCodeRunningSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp);
+
+ ~NSDictionaryCodeRunningSyntheticFrontEnd() override = default;
+
+ size_t
+ CalculateNumChildren() override;
- virtual size_t
- CalculateNumChildren ();
-
- virtual lldb::ValueObjectSP
- GetChildAtIndex (size_t idx);
-
- virtual bool
- Update();
+ lldb::ValueObjectSP
+ GetChildAtIndex(size_t idx) override;
- virtual bool
- MightHaveChildren ();
+ bool
+ Update() override;
- virtual size_t
- GetIndexOfChildWithName (const ConstString &name);
+ bool
+ MightHaveChildren() override;
- virtual
- ~NSDictionaryCodeRunningSyntheticFrontEnd ();
+ size_t
+ GetIndexOfChildWithName(const ConstString &name) override;
};
- }
-}
+ } // namespace formatters
+} // namespace lldb_private
template<bool name_entries>
bool
@@ -404,9 +409,6 @@ lldb_private::formatters::NSDictionaryCo
return 0;
}
-lldb_private::formatters::NSDictionaryCodeRunningSyntheticFrontEnd::~NSDictionaryCodeRunningSyntheticFrontEnd ()
-{}
-
lldb_private::formatters::NSDictionaryISyntheticFrontEnd::NSDictionaryISyntheticFrontEnd (lldb::ValueObjectSP valobj_sp) :
SyntheticChildrenFrontEnd(*valobj_sp.get()),
m_exe_ctx_ref(),
@@ -740,7 +742,7 @@ lldb_private::formatters::NSDictionaryMS
}
template bool
-lldb_private::formatters::NSDictionarySummaryProvider<true> (ValueObject&, Stream&, const TypeSummaryOptions&) ;
+lldb_private::formatters::NSDictionarySummaryProvider<true> (ValueObject&, Stream&, const TypeSummaryOptions&);
template bool
-lldb_private::formatters::NSDictionarySummaryProvider<false> (ValueObject&, Stream&, const TypeSummaryOptions&) ;
+lldb_private::formatters::NSDictionarySummaryProvider<false> (ValueObject&, Stream&, const TypeSummaryOptions&);
Modified: lldb/trunk/source/Plugins/Language/ObjC/NSIndexPath.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/NSIndexPath.cpp?rev=250789&r1=250788&r2=250789&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/ObjC/NSIndexPath.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/NSIndexPath.cpp Mon Oct 19 20:10:59 2015
@@ -1,4 +1,4 @@
-//===-- NSIndexPath.cpp ------------------------------------------*- C++ -*-===//
+//===-- NSIndexPath.cpp -----------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -7,6 +7,10 @@
//
//===----------------------------------------------------------------------===//
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
#include "Cocoa.h"
#include "lldb/Core/ValueObject.h"
@@ -31,21 +35,23 @@ public:
{
m_ptr_size = m_backend.GetTargetSP()->GetArchitecture().GetAddressByteSize();
}
-
- virtual size_t
- CalculateNumChildren ()
+
+ ~NSIndexPathSyntheticFrontEnd() override = default;
+
+ size_t
+ CalculateNumChildren() override
{
return m_impl.GetNumIndexes();
}
- virtual lldb::ValueObjectSP
- GetChildAtIndex (size_t idx)
+ lldb::ValueObjectSP
+ GetChildAtIndex(size_t idx) override
{
return m_impl.GetIndexAtIndex(idx, m_uint_star_type);
}
- virtual bool
- Update()
+ bool
+ Update() override
{
m_impl.Clear();
@@ -129,16 +135,16 @@ public:
return false;
}
- virtual bool
- MightHaveChildren ()
+ bool
+ MightHaveChildren() override
{
if (m_impl.m_mode == Mode::Invalid)
return false;
return true;
}
- virtual size_t
- GetIndexOfChildWithName (const ConstString &name)
+ size_t
+ GetIndexOfChildWithName(const ConstString &name) override
{
const char* item_name = name.GetCString();
uint32_t idx = ExtractIndexFromString(item_name);
@@ -147,12 +153,12 @@ public:
return idx;
}
- virtual lldb::ValueObjectSP
- GetSyntheticValue () { return nullptr; }
-
- virtual
- ~NSIndexPathSyntheticFrontEnd () {}
-
+ lldb::ValueObjectSP
+ GetSyntheticValue() override
+ {
+ return nullptr;
+ }
+
protected:
ObjCLanguageRuntime::ClassDescriptorSP m_descriptor_sp;
@@ -245,7 +251,7 @@ protected:
m_process = nullptr;
}
- private:
+ private:
uint64_t m_indexes;
size_t m_count;
uint32_t m_ptr_size;
@@ -337,5 +343,6 @@ namespace lldb_private {
return new NSIndexPathSyntheticFrontEnd(valobj_sp);
return nullptr;
}
- }
-}
+
+ } // namespace formatters
+} // namespace lldb_private
Modified: lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp?rev=250789&r1=250788&r2=250789&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/NSSet.cpp Mon Oct 19 20:10:59 2015
@@ -1,4 +1,4 @@
-//===-- NSSet.cpp ------------------------------------------------*- C++ -*-===//
+//===-- NSSet.cpp -----------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -7,6 +7,10 @@
//
//===----------------------------------------------------------------------===//
+// C Includes
+// C++ Includes
+// Other libraries and framework includes
+// Project includes
#include "NSSet.h"
#include "lldb/Core/DataBufferHeap.h"
@@ -43,45 +47,45 @@ namespace lldb_private {
namespace formatters {
class NSSetISyntheticFrontEnd : public SyntheticChildrenFrontEnd
{
+ public:
+ NSSetISyntheticFrontEnd (lldb::ValueObjectSP valobj_sp);
+
+ ~NSSetISyntheticFrontEnd() override;
+
+ size_t
+ CalculateNumChildren() override;
+
+ lldb::ValueObjectSP
+ GetChildAtIndex(size_t idx) override;
+
+ bool
+ Update() override;
+
+ bool
+ MightHaveChildren() override;
+
+ size_t
+ GetIndexOfChildWithName(const ConstString &name) override;
+
private:
struct DataDescriptor_32
{
uint32_t _used : 26;
uint32_t _szidx : 6;
};
+
struct DataDescriptor_64
{
uint64_t _used : 58;
uint32_t _szidx : 6;
};
-
+
struct SetItemDescriptor
{
lldb::addr_t item_ptr;
lldb::ValueObjectSP valobj_sp;
};
-
- public:
- NSSetISyntheticFrontEnd (lldb::ValueObjectSP valobj_sp);
-
- virtual size_t
- CalculateNumChildren ();
-
- virtual lldb::ValueObjectSP
- GetChildAtIndex (size_t idx);
-
- virtual bool
- Update();
-
- virtual bool
- MightHaveChildren ();
-
- virtual size_t
- GetIndexOfChildWithName (const ConstString &name);
-
- virtual
- ~NSSetISyntheticFrontEnd ();
- private:
+
ExecutionContextRef m_exe_ctx_ref;
uint8_t m_ptr_size;
DataDescriptor_32 *m_data_32;
@@ -92,28 +96,26 @@ namespace lldb_private {
class NSOrderedSetSyntheticFrontEnd : public SyntheticChildrenFrontEnd
{
- private:
-
public:
NSOrderedSetSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp);
+
+ ~NSOrderedSetSyntheticFrontEnd() override = default;
+
+ size_t
+ CalculateNumChildren() override;
- virtual size_t
- CalculateNumChildren ();
-
- virtual lldb::ValueObjectSP
- GetChildAtIndex (size_t idx);
-
- virtual bool
- Update();
+ lldb::ValueObjectSP
+ GetChildAtIndex(size_t idx) override;
- virtual bool
- MightHaveChildren ();
+ bool
+ Update() override;
- virtual size_t
- GetIndexOfChildWithName (const ConstString &name);
+ bool
+ MightHaveChildren() override;
- virtual
- ~NSOrderedSetSyntheticFrontEnd ();
+ size_t
+ GetIndexOfChildWithName(const ConstString &name) override;
+
private:
uint32_t m_count;
std::map<uint32_t,lldb::ValueObjectSP> m_children;
@@ -121,6 +123,26 @@ namespace lldb_private {
class NSSetMSyntheticFrontEnd : public SyntheticChildrenFrontEnd
{
+ public:
+ NSSetMSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp);
+
+ ~NSSetMSyntheticFrontEnd() override;
+
+ size_t
+ CalculateNumChildren() override;
+
+ lldb::ValueObjectSP
+ GetChildAtIndex(size_t idx) override;
+
+ bool
+ Update() override;
+
+ bool
+ MightHaveChildren() override;
+
+ size_t
+ GetIndexOfChildWithName(const ConstString &name) override;
+
private:
struct DataDescriptor_32
{
@@ -129,6 +151,7 @@ namespace lldb_private {
uint32_t _mutations;
uint32_t _objs_addr;
};
+
struct DataDescriptor_64
{
uint64_t _used : 58;
@@ -136,32 +159,13 @@ namespace lldb_private {
uint64_t _mutations;
uint64_t _objs_addr;
};
+
struct SetItemDescriptor
{
lldb::addr_t item_ptr;
lldb::ValueObjectSP valobj_sp;
};
- public:
- NSSetMSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp);
-
- virtual size_t
- CalculateNumChildren ();
-
- virtual lldb::ValueObjectSP
- GetChildAtIndex (size_t idx);
-
- virtual bool
- Update();
-
- virtual bool
- MightHaveChildren ();
-
- virtual size_t
- GetIndexOfChildWithName (const ConstString &name);
-
- virtual
- ~NSSetMSyntheticFrontEnd ();
- private:
+
ExecutionContextRef m_exe_ctx_ref;
uint8_t m_ptr_size;
DataDescriptor_32 *m_data_32;
@@ -173,27 +177,26 @@ namespace lldb_private {
{
public:
NSSetCodeRunningSyntheticFrontEnd (lldb::ValueObjectSP valobj_sp);
+
+ ~NSSetCodeRunningSyntheticFrontEnd() override;
+
+ size_t
+ CalculateNumChildren() override;
- virtual size_t
- CalculateNumChildren ();
-
- virtual lldb::ValueObjectSP
- GetChildAtIndex (size_t idx);
-
- virtual bool
- Update();
+ lldb::ValueObjectSP
+ GetChildAtIndex(size_t idx) override;
- virtual bool
- MightHaveChildren ();
+ bool
+ Update() override;
- virtual size_t
- GetIndexOfChildWithName (const ConstString &name);
+ bool
+ MightHaveChildren() override;
- virtual
- ~NSSetCodeRunningSyntheticFrontEnd ();
+ size_t
+ GetIndexOfChildWithName(const ConstString &name) override;
};
- }
-}
+ } // namespace formatters
+} // namespace lldb_private
template<bool cf_style>
bool
@@ -748,13 +751,8 @@ lldb_private::formatters::NSOrderedSetSy
return idx;
}
-lldb_private::formatters::NSOrderedSetSyntheticFrontEnd::~NSOrderedSetSyntheticFrontEnd ()
-{
-}
-
template bool
lldb_private::formatters::NSSetSummaryProvider<true> (ValueObject& valobj, Stream& stream, const TypeSummaryOptions& options);
template bool
lldb_private::formatters::NSSetSummaryProvider<false> (ValueObject& valobj, Stream& stream, const TypeSummaryOptions& options);
-
Modified: lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.cpp
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.cpp?rev=250789&r1=250788&r2=250789&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.cpp (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.cpp Mon Oct 19 20:10:59 2015
@@ -1,4 +1,4 @@
-//===-- ObjCLanguage.cpp --------------------------------------*- C++ -*-===//
+//===-- ObjCLanguage.cpp ----------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -7,10 +7,14 @@
//
//===----------------------------------------------------------------------===//
-#include "ObjCLanguage.h"
-
+// C Includes
+// C++ Includes
#include <mutex>
+// Other libraries and framework includes
+// Project includes
+#include "ObjCLanguage.h"
+
#include "lldb/Core/ConstString.h"
#include "lldb/Core/PluginManager.h"
#include "lldb/Core/StreamString.h"
@@ -52,7 +56,6 @@ ObjCLanguage::GetPluginNameStatic()
return g_name;
}
-
//------------------------------------------------------------------
// PluginInterface protocol
//------------------------------------------------------------------
@@ -441,7 +444,6 @@ LoadObjCFormatters(TypeCategoryImplSP ob
appkit_flags.SetDontShowChildren(false);
-
#ifndef LLDB_DISABLE_PYTHON
AddCXXSummary(objc_category_sp, lldb_private::formatters::NSArraySummaryProvider, "NSArray summary provider", ConstString("NSArray"), appkit_flags);
AddCXXSummary(objc_category_sp, lldb_private::formatters::NSArraySummaryProvider, "NSArray summary provider", ConstString("NSMutableArray"), appkit_flags);
@@ -610,7 +612,6 @@ LoadCoreMediaFormatters(TypeCategoryImpl
#endif // LLDB_DISABLE_PYTHON
}
-
lldb::TypeCategoryImplSP
ObjCLanguage::GetFormatters ()
{
@@ -696,7 +697,8 @@ ObjCLanguage::GetTypeScavenger ()
return false;
}
- virtual ~ObjCScavengerResult() = default;
+ ~ObjCScavengerResult() override = default;
+
private:
CompilerType m_compiler_type;
};
@@ -704,7 +706,7 @@ ObjCLanguage::GetTypeScavenger ()
protected:
ObjCTypeScavenger() = default;
- virtual ~ObjCTypeScavenger() = default;
+ ~ObjCTypeScavenger() override = default;
bool
Find_Impl (ExecutionContextScope *exe_scope,
Modified: lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.h?rev=250789&r1=250788&r2=250789&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.h (original)
+++ lldb/trunk/source/Plugins/Language/ObjC/ObjCLanguage.h Mon Oct 19 20:10:59 2015
@@ -1,4 +1,4 @@
-//===-- ObjCLanguage.h ----------------------------------------*- C++ -*-===//
+//===-- ObjCLanguage.h ------------------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -119,6 +119,7 @@ public:
// names[3] => "-[NSString myStringWithCString:]"
size_t
GetFullNames (std::vector<ConstString> &names, bool append);
+
protected:
ConstString m_full; // Full name: "+[NSString(my_additions) myStringWithCString:]"
ConstString m_class; // Class name: "NSString"
@@ -127,13 +128,12 @@ public:
ConstString m_selector; // Selector: "myStringWithCString:"
Type m_type;
bool m_category_is_valid;
-
};
- virtual ~ObjCLanguage() = default;
-
- ObjCLanguage () = default;
-
+ ObjCLanguage() = default;
+
+ ~ObjCLanguage() override = default;
+
lldb::LanguageType
GetLanguageType () const override
{
@@ -195,13 +195,13 @@ public:
//------------------------------------------------------------------
// PluginInterface protocol
//------------------------------------------------------------------
- virtual ConstString
+ ConstString
GetPluginName() override;
- virtual uint32_t
+ uint32_t
GetPluginVersion() override;
};
} // namespace lldb_private
-#endif // liblldb_ObjCLanguage_h_
+#endif // liblldb_ObjCLanguage_h_
Modified: lldb/trunk/source/Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.h
URL: http://llvm.org/viewvc/llvm-project/lldb/trunk/source/Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.h?rev=250789&r1=250788&r2=250789&view=diff
==============================================================================
--- lldb/trunk/source/Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.h (original)
+++ lldb/trunk/source/Plugins/Language/ObjCPlusPlus/ObjCPlusPlusLanguage.h Mon Oct 19 20:10:59 2015
@@ -1,4 +1,4 @@
-//===-- ObjCPlusPlusLanguage.h ----------------------------------------*- C++ -*-===//
+//===-- ObjCPlusPlusLanguage.h ----------------------------------*- C++ -*-===//
//
// The LLVM Compiler Infrastructure
//
@@ -23,12 +23,12 @@ class ObjCPlusPlusLanguage :
public Language
{
public:
- virtual ~ObjCPlusPlusLanguage() = default;
-
- ObjCPlusPlusLanguage () = default;
-
+ ObjCPlusPlusLanguage() = default;
+
+ ~ObjCPlusPlusLanguage() override = default;
+
lldb::LanguageType
- GetLanguageType () const
+ GetLanguageType() const override
{
return lldb::eLanguageTypeObjC_plus_plus;
}
@@ -51,13 +51,13 @@ public:
//------------------------------------------------------------------
// PluginInterface protocol
//------------------------------------------------------------------
- virtual ConstString
- GetPluginName();
+ ConstString
+ GetPluginName() override;
- virtual uint32_t
- GetPluginVersion();
+ uint32_t
+ GetPluginVersion() override;
};
} // namespace lldb_private
-#endif // liblldb_CPlusPlusLanguage_h_
+#endif // liblldb_CPlusPlusLanguage_h_
More information about the lldb-commits
mailing list