diff options
author | Raphael Isemann <teemperor@gmail.com> | 2019-09-26 11:30:41 +0000 |
---|---|---|
committer | Raphael Isemann <teemperor@gmail.com> | 2019-09-26 11:30:41 +0000 |
commit | cce4b8848b6f5b9d3f11a54ee04db705b717b6da (patch) | |
tree | ca3660e6ecfe2aa2e06b9343183cdb0af574ae7c /lldb/packages/Python/lldbsuite/test | |
parent | 75738450618d009126375b4d78538d06b10a9955 (diff) | |
download | bcm5719-llvm-cce4b8848b6f5b9d3f11a54ee04db705b717b6da.tar.gz bcm5719-llvm-cce4b8848b6f5b9d3f11a54ee04db705b717b6da.zip |
[lldb][modern-type-lookup] Add test for using the ClangModulesDeclVendor
llvm-svn: 372965
Diffstat (limited to 'lldb/packages/Python/lldbsuite/test')
3 files changed, 36 insertions, 0 deletions
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 new file mode 100644 index 00000000000..afecbf96948 --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/Makefile @@ -0,0 +1,4 @@ +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 new file mode 100644 index 00000000000..3983263bd65 --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/TestObjModulesModernTypeLookup.py @@ -0,0 +1,26 @@ +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 new file mode 100644 index 00000000000..9eb93f0e8c5 --- /dev/null +++ b/lldb/packages/Python/lldbsuite/test/functionalities/modern-type-lookup/objc-modules/main.m @@ -0,0 +1,6 @@ +#import <Foundation/Foundation.h> + +int main() { + NSLog(@"Hello World"); + return 0; // break here +} |