40 lines · plain
1// RUN: %clang_cc1 -emit-llvm -fobjc-arc -debug-info-kind=limited -triple x86_64-apple-darwin10 %s -o - | FileCheck %s2// Ensure that the line info is making sense:3// ARC cleanups should be at the closing '}'.4@protocol NSObject5@end6 7@interface NSObject <NSObject> {}8@end9 10@protocol NSCopying11@end12 13@protocol NSCoding14@end15 16typedef double CGFloat;17struct CGRect {};18typedef struct CGRect CGRect;19typedef CGRect NSRect;20NSRect NSMakeRect(CGFloat x, CGFloat y, CGFloat w, CGFloat h);21@interface NSBezierPath : NSObject <NSCopying, NSCoding>22+ (NSBezierPath *)bezierPathWithRoundedRect:(NSRect)rect xRadius:(CGFloat)xRadius yRadius:(CGFloat)yRadius;23@end24@implementation AppDelegate : NSObject {}25- (NSBezierPath *)_createBezierPathWithWidth:(CGFloat)width height:(CGFloat)height radius:(CGFloat)radius lineWidth:(CGFloat)lineWidth26{27 NSRect rect = NSMakeRect(0, 0, width, height);28 NSBezierPath *path = [NSBezierPath bezierPathWithRoundedRect:rect xRadius:radius yRadius:radius];29 CGFloat pattern[2];30 // CHECK: define {{.*}}_createBezierPathWithWidth31 // CHECK: load {{.*}} %path, align {{.*}}, !dbg ![[RET:[0-9]+]]32 // CHECK: call void @llvm.objc.storeStrong{{.*}} !dbg ![[ARC:[0-9]+]]33 // CHECK: call {{.*}} @llvm.objc.autoreleaseReturnValue{{.*}} !dbg ![[ARC]]34 // CHECK: ret {{.*}} !dbg ![[ARC]]35 // CHECK: ![[RET]] = !DILocation(line: [[@LINE+1]], column: 10, scope: !{{.*}})36 return path;37 // CHECK: ![[ARC]] = !DILocation(line: [[@LINE+1]], column: 1, scope: !{{.*}})38}39@end40