forked from OSchip/llvm-project
[lldb][modern-type-lookup] Add test for using the ClangModulesDeclVendor
llvm-svn: 372965
This commit is contained in:
parent
7573845061
commit
cce4b8848b
|
|
@ -0,0 +1,4 @@
|
|||
OBJC_SOURCES := main.m
|
||||
LD_EXTRAS := -lobjc -framework Foundation
|
||||
|
||||
include Makefile.rules
|
||||
|
|
@ -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"])
|
||||
|
|
@ -0,0 +1,6 @@
|
|||
#import <Foundation/Foundation.h>
|
||||
|
||||
int main() {
|
||||
NSLog(@"Hello World");
|
||||
return 0; // break here
|
||||
}
|
||||
Loading…
Reference in New Issue