summaryrefslogtreecommitdiffstats
path: root/lldb/source/DataFormatters/FormatClasses.cpp
diff options
context:
space:
mode:
authorEnrico Granata <egranata@apple.com>2013-11-22 00:02:13 +0000
committerEnrico Granata <egranata@apple.com>2013-11-22 00:02:13 +0000
commitde61cecd1ccfd4024ddf527bda37c12806296427 (patch)
treeaf56af873c9de6a2ff62bf49249427b44f1df192 /lldb/source/DataFormatters/FormatClasses.cpp
parent340cdda2f69751b9140c844dfae6773e1439ab3e (diff)
downloadbcm5719-llvm-de61cecd1ccfd4024ddf527bda37c12806296427.tar.gz
bcm5719-llvm-de61cecd1ccfd4024ddf527bda37c12806296427.zip
<rdar://problem/15530080>
Rework data formatters matching algorithm What happens now is that, for each category, the FormatNavigator generates all possible matches, and checks them one by one Since the possible matches do not actually depend on the category (whether a match is accepted or not does, but that check can be shifted at a more convenient time), it is actually feasible to generate every possible match upfront and then let individual categories just scan through those This commit changes things by introducing a notion of formatters match candidate, and shifting responsibility for generating all of them given a (ValueObject,DynamicValueType) pair from the FormatNavigator back to the FormatManager A list of these candidates is then passed down to each category for matching Candidates also need to remember whether they were generated by stripping pointers, references, typedefs, since this is something that individual formatters can choose to reject This check, however, is conveniently only done once a "textual" match has been found, so that the list of candidates is truly category-independent While the performance benefit is small (mostly, due to caching), this is much cleaner from a design perspective llvm-svn: 195395
Diffstat (limited to 'lldb/source/DataFormatters/FormatClasses.cpp')
-rw-r--r--lldb/source/DataFormatters/FormatClasses.cpp13
1 files changed, 1 insertions, 12 deletions
diff --git a/lldb/source/DataFormatters/FormatClasses.cpp b/lldb/source/DataFormatters/FormatClasses.cpp
index c67f86a7493..f27b45b3049 100644
--- a/lldb/source/DataFormatters/FormatClasses.cpp
+++ b/lldb/source/DataFormatters/FormatClasses.cpp
@@ -7,7 +7,7 @@
//
//===----------------------------------------------------------------------===//
-#include "lldb/lldb-python.h"
+#include "lldb/DataFormatters/FormatClasses.h"
// C Includes
@@ -16,17 +16,6 @@
// Other libraries and framework includes
// Project includes
-#include "lldb/lldb-public.h"
-#include "lldb/lldb-enumerations.h"
-
-#include "lldb/Core/Debugger.h"
-#include "lldb/Core/StreamString.h"
-#include "lldb/Core/Timer.h"
-#include "lldb/DataFormatters/FormatClasses.h"
-#include "lldb/Interpreter/CommandInterpreter.h"
-#include "lldb/Symbol/ClangASTType.h"
-#include "lldb/Target/StackFrame.h"
-#include "lldb/Target/Target.h"
using namespace lldb;
using namespace lldb_private;
OpenPOWER on IntegriCloud