Files
clang-p2996/lldb/test/lang/objc/objc-class-method/class.m
Sean Callanan fc89c142d3 Added functionality to call Objective-C class methods
correctly, and added a testcase to check that it works.

The main problem here is that Objective-C class method
selectors are external references stored in a special
data structure in the LLVM IR module for an expression.
I just had to extract them and ensure that the real
class object locations were properly resolved.

llvm-svn: 143520
2011-11-01 23:38:03 +00:00

25 lines
458 B
Objective-C

#import <Foundation/Foundation.h>
@interface Foo : NSObject
+(int) doSomethingWithString: (NSString *) string;
-(int) doSomethingInstance: (NSString *) string;
@end
@implementation Foo
+(int) doSomethingWithString: (NSString *) string
{
NSLog (@"String is: %@.", string);
return [string length];
}
-(int) doSomethingInstance: (NSString *)string
{
return [Foo doSomethingWithString:string];
}
@end
int main()
{
return 0; // Set breakpoint here.
}