summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGenObjC
diff options
context:
space:
mode:
authorFariborz Jahanian <fjahanian@apple.com>2014-04-23 17:44:58 +0000
committerFariborz Jahanian <fjahanian@apple.com>2014-04-23 17:44:58 +0000
commit9da2a799abd809770efab64555321c01987cd591 (patch)
tree63b3df4816acf104de04d975e89541b84b4729e2 /clang/test/CodeGenObjC
parenteb08c4f038954ac8a25839cec7198285fcf58d22 (diff)
downloadbcm5719-llvm-9da2a799abd809770efab64555321c01987cd591.tar.gz
bcm5719-llvm-9da2a799abd809770efab64555321c01987cd591.zip
Objective-C [IRGen]. Fixes a crash in IRGen involving use of
'typeof' to extract type of an @encode expression used in an initializer. // rdar://16655340 llvm-svn: 207004
Diffstat (limited to 'clang/test/CodeGenObjC')
-rw-r--r--clang/test/CodeGenObjC/encode-test-6.m11
1 files changed, 11 insertions, 0 deletions
diff --git a/clang/test/CodeGenObjC/encode-test-6.m b/clang/test/CodeGenObjC/encode-test-6.m
index 54a4eb03d5c..4e9c4222033 100644
--- a/clang/test/CodeGenObjC/encode-test-6.m
+++ b/clang/test/CodeGenObjC/encode-test-6.m
@@ -53,3 +53,14 @@ typedef struct
}
@end
// CHECK: private global [39 x i8] c"{?=\22presentationInstance\22^{SCNCamera}}\00"
+
+// rdar://16655340
+int i;
+typeof(@encode(typeof(i))) e = @encode(typeof(i));
+const char * Test()
+{
+ return e;
+}
+// CHECK: @e = global [2 x i8] c"i\00", align 1
+// CHECK: define i8* @Test()
+// CHECK: ret i8* getelementptr inbounds ([2 x i8]* @e, i32 0, i32 0)
OpenPOWER on IntegriCloud