From 222e2a7620e6520ffaf4fc4e69d79c18da31542e Mon Sep 17 00:00:00 2001 From: "Zancanaro; Carlo" Date: Mon, 24 Sep 2012 09:58:17 +1000 Subject: Add the clang library to the repo (with some of my changes, too). --- clang/test/CodeGenObjC/objc2-protocol-enc.m | 43 +++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 clang/test/CodeGenObjC/objc2-protocol-enc.m (limited to 'clang/test/CodeGenObjC/objc2-protocol-enc.m') diff --git a/clang/test/CodeGenObjC/objc2-protocol-enc.m b/clang/test/CodeGenObjC/objc2-protocol-enc.m new file mode 100644 index 0000000..0db0cb8 --- /dev/null +++ b/clang/test/CodeGenObjC/objc2-protocol-enc.m @@ -0,0 +1,43 @@ +// RUN: %clang_cc1 -triple=i686-apple-darwin9 -emit-llvm -o %t %s +// RUN: grep -e "T@\\\22\\\22" %t +// RUN: grep -e "T@\\\22\\\22" %t +// RUN: grep -e "T@\\\22\\\22" %t +// RUN: grep -e "T@\\\22Foo\\\22" %t + +@protocol X, Y, Z; +@class Foo; + +@protocol Proto +@property (copy) id x; +@property (copy) id xy; +@property (copy) id xyz; +@property(copy) Foo *fooxyz; +@end + +@interface Intf +{ +id IVAR_x; +id IVAR_xy; +id IVAR_xyz; +Foo *IVAR_Fooxyz; +} +@end + +@implementation Intf +@dynamic x, xy, xyz, fooxyz; +@end + +/** +This protocol should generate the following metadata: +struct objc_property_list __Protocol_Test_metadata = { + sizeof(struct objc_property), 4, + { + { "x", "T@\"\"" }, + { "xy", "T@\"\"" }, + { "xyz", "T@\"\"" }, + { "fooxyz", "T@\"Foo\"" } + } +}; + +"T@\"\",D +*/ -- cgit v1.2.3