diff options
author | Raphael Isemann <teemperor@gmail.com> | 2019-12-17 12:22:34 +0100 |
---|---|---|
committer | Raphael Isemann <teemperor@gmail.com> | 2019-12-17 12:24:31 +0100 |
commit | ff0102b32cfe506dfc16a86e38e70b0940697aa2 (patch) | |
tree | 5ca3f549f0f4768a7f8b95af6297382a521de7ed /lldb/packages/Python/lldbsuite/test | |
parent | df5a905aa8a868bdb700d88e427491ee56243e30 (diff) | |
download | bcm5719-llvm-ff0102b32cfe506dfc16a86e38e70b0940697aa2.tar.gz bcm5719-llvm-ff0102b32cfe506dfc16a86e38e70b0940697aa2.zip |
[lldb] Remove modern-type-lookup
Summary:
As discussed on the mailing list [1] we have to make a decision for how to proceed with the modern-type-lookup.
This patch removes modern-type-lookup from LLDB. This just removes all the code behind the modern-type-lookup
setting but it does *not* remove any code from Clang (i.e., the ExternalASTMerger and the clang-import-test stay around
for now).
The motivation for this is that I don't think that the current approach of implementing modern-type-lookup
will work out. Especially creating a completely new lookup system behind some setting that is never turned on by anyone
and then one day make one big switch to the new system seems wrong. It doesn't fit into the way LLVM is developed and has
so far made the transition work much more complicated than it has to be.
A lot of the benefits that were supposed to come with the modern-type-lookup are related to having a better organization
in the way types move across LLDB and having less dependencies on unrelated LLDB code. By just looking at the current code (mostly
the ClangASTImporter) I think we can reach the same goals by just incrementally cleaning up, documenting, refactoring
and actually testing the existing code we have.
[1] http://lists.llvm.org/pipermail/lldb-dev/2019-December/015831.html
Reviewers: shafik, martong
Subscribers: rnkovacs, christof, arphaman, JDevlieghere, usaxena95, lldb-commits, friss
Tags: #lldb
Differential Revision: https://reviews.llvm.org/D71562
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
12 files changed, 0 insertions, 145 deletions
diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/basic-objc/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/basic-objc/Makefile deleted file mode 100644 index afecbf96948..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/basic-objc/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -OBJC_SOURCES := main.m -LD_EXTRAS := -lobjc -framework Foundation - -include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/basic-objc/TestBasicObjcModernTypeLookup.py b/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/basic-objc/TestBasicObjcModernTypeLookup.py deleted file mode 100644 index 700b3ecbe6b..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/basic-objc/TestBasicObjcModernTypeLookup.py +++ /dev/null @@ -1,18 +0,0 @@ -import lldb -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - -class TestBasicObjcModernTypeLookup(TestBase): - mydir = TestBase.compute_mydir(__file__) - - @skipUnlessDarwin - def test(self): - self.build() - # Activate modern-type-lookup. - # FIXME: This has to happen before we create any target otherwise we crash... - self.runCmd("settings set target.experimental.use-modern-type-lookup true") - (target, process, thread, main_breakpoint) = lldbutil.run_to_source_breakpoint(self, - "break here", lldb.SBFileSpec("main.m")) - self.expect("expr 1", substrs=["(int) ", " = 1"]) - self.expect("expr (int)[Foo bar:22]", substrs=["(int) ", " = 44"]) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/basic-objc/main.m b/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/basic-objc/main.m deleted file mode 100644 index b427971e7be..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/basic-objc/main.m +++ /dev/null @@ -1,17 +0,0 @@ -#import <Foundation/Foundation.h> - -@interface Foo : NSObject -+(int) bar: (int) string; -@end - -@implementation Foo -+(int) bar: (int) x -{ - return x + x; -} -@end - -int main() { - NSLog(@"Hello World"); - return 0; // break here -} diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/basic/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/basic/Makefile deleted file mode 100644 index 3d0b98f13f3..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/basic/Makefile +++ /dev/null @@ -1,2 +0,0 @@ -CXX_SOURCES := main.cpp -include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/basic/TestBasicModernTypeLookup.py b/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/basic/TestBasicModernTypeLookup.py deleted file mode 100644 index 613fb95658b..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/basic/TestBasicModernTypeLookup.py +++ /dev/null @@ -1,21 +0,0 @@ -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - -class BasicModernTypeLookup(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - def test(self): - self.build() - - # Activate modern-type-lookup. - self.runCmd("settings set target.experimental.use-modern-type-lookup true") - - lldbutil.run_to_source_breakpoint(self, - "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) - - # Test a few simple expressions that should still work with modern-type-lookup. - self.expect("expr 1", substrs=["(int) ", " = 1\n"]) - self.expect("expr f.x", substrs=["(int) ", " = 44\n"]) - self.expect("expr f", substrs=["(Foo) ", "x = 44"]) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/basic/main.cpp b/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/basic/main.cpp deleted file mode 100644 index e0c3ead7f75..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/basic/main.cpp +++ /dev/null @@ -1,7 +0,0 @@ -struct Foo { int x; }; - -int main(int argc, char **argv) { - Foo f; - f.x = 44; - return f.x; // Set break point at this line. -} diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/Makefile deleted file mode 100644 index 574c53d7cb1..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/Makefile +++ /dev/null @@ -1,3 +0,0 @@ -CXX_SOURCES := main.cpp -USE_LIBCPP := 1 -include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/TestLibCxxModernTypeLookup.py b/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/TestLibCxxModernTypeLookup.py deleted file mode 100644 index b780677e709..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/TestLibCxxModernTypeLookup.py +++ /dev/null @@ -1,23 +0,0 @@ -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - -class LibcxxModernTypeLookup(TestBase): - - mydir = TestBase.compute_mydir(__file__) - - @add_test_categories(["libc++"]) - def test(self): - self.build() - - # Activate modern-type-lookup. - self.runCmd("settings set target.experimental.use-modern-type-lookup true") - - lldbutil.run_to_source_breakpoint(self, - "// Set break point at this line.", lldb.SBFileSpec("main.cpp")) - - # Test a few simple expressions that should still work with modern-type-lookup. - self.expect("expr pair", substrs=["(std::", "pair<int, long", "= (first = 1, second = 2)"]) - self.expect("expr foo", substrs=["(std::", "string", "\"bar\""]) - self.expect("expr map", substrs=["(std::", "map", "first = 1, second = 2"]) - self.expect("expr umap", substrs=["(std::", "unordered_map", "first = 1, second = 2"]) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/main.cpp b/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/main.cpp deleted file mode 100644 index 50cc8b1f61c..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/libcxx/main.cpp +++ /dev/null @@ -1,14 +0,0 @@ -#include <utility> -#include <string> -#include <map> -#include <unordered_map> - -int main(int argc, char **argv) { - std::pair<int, long> pair = std::make_pair<int, float>(1, 2L); - std::string foo = "bar"; - std::map<int, int> map; - map[1] = 2; - std::unordered_map<int, int> umap; - umap[1] = 2; - return pair.first; // Set break point at this line. -} diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/Makefile b/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/Makefile deleted file mode 100644 index afecbf96948..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/Makefile +++ /dev/null @@ -1,4 +0,0 @@ -OBJC_SOURCES := main.m -LD_EXTRAS := -lobjc -framework Foundation - -include Makefile.rules diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/TestObjModulesModernTypeLookup.py b/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/TestObjModulesModernTypeLookup.py deleted file mode 100644 index 3983263bd65..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/TestObjModulesModernTypeLookup.py +++ /dev/null @@ -1,26 +0,0 @@ -import lldb -from lldbsuite.test.decorators import * -from lldbsuite.test.lldbtest import * -from lldbsuite.test import lldbutil - -class TestObjcModulesModernTypeLookup(TestBase): - mydir = TestBase.compute_mydir(__file__) - - @skipUnlessDarwin - # gmodules causes this to crash as we seem to get a NSURL type from the debug information. - @skipIf(debug_info="gmodules") - def test(self): - self.build() - # Activate modern-type-lookup. - # FIXME: This has to happen before we create any target otherwise we crash... - self.runCmd("settings set target.experimental.use-modern-type-lookup true") - (target, process, thread, main_breakpoint) = lldbutil.run_to_source_breakpoint(self, - "break here", lldb.SBFileSpec("main.m")) - self.expect("expr @import Foundation") - self.expect( - "p *[NSURL URLWithString:@\"http://lldb.llvm.org\"]", - VARIABLES_DISPLAYED_CORRECTLY, - substrs=[ - "NSURL", - "isa", - "_urlString"]) diff --git a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/main.m b/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/main.m deleted file mode 100644 index 9eb93f0e8c5..00000000000 --- a/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/main.m +++ /dev/null @@ -1,6 +0,0 @@ -#import <Foundation/Foundation.h> - -int main() { - NSLog(@"Hello World"); - return 0; // break here -} |