[cfe-commits] r116225 - in /cfe/trunk/test/CodeGenObjC: encode-test-1.m encode-test.m
Daniel Dunbar
daniel at zuster.org
Mon Oct 11 14:13:46 PDT 2010
Author: ddunbar
Date: Mon Oct 11 16:13:46 2010
New Revision: 116225
URL: http://llvm.org/viewvc/llvm-project?rev=116225&view=rev
Log:
Merge encode-test-1.m into encode-test.m
Removed:
cfe/trunk/test/CodeGenObjC/encode-test-1.m
Modified:
cfe/trunk/test/CodeGenObjC/encode-test.m
Removed: cfe/trunk/test/CodeGenObjC/encode-test-1.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/encode-test-1.m?rev=116224&view=auto
==============================================================================
--- cfe/trunk/test/CodeGenObjC/encode-test-1.m (original)
+++ cfe/trunk/test/CodeGenObjC/encode-test-1.m (removed)
@@ -1,36 +0,0 @@
-// RUN: %clang_cc1 -triple=i686-apple-darwin9 -emit-llvm -o %t %s
-// RUN: grep -e "{Base=b2b3b4b5}" %t | count 1
-// RUN: grep -e "{Derived=b2b3b4b5b5b4b3}" %t | count 1
-
-enum Enum { one, two, three, four };
-
- at interface Base {
- unsigned a: 2;
- int b: 3;
- enum Enum c: 4;
- unsigned d: 5;
-}
- at end
-
- at interface Derived: Base {
- signed e: 5;
- int f: 4;
- enum Enum g: 3;
-}
- at end
-
- at implementation Base @end
-
- at implementation Derived @end
-
-int main(void)
-{
-
- const char *en = @encode(Base);
-// printf ("%s\n", en);
-
- const char *ed = @encode(Derived);
- // printf ("%s\n", ed);
-
- return 0;
-}
Modified: cfe/trunk/test/CodeGenObjC/encode-test.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/encode-test.m?rev=116225&r1=116224&r2=116225&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenObjC/encode-test.m (original)
+++ cfe/trunk/test/CodeGenObjC/encode-test.m Mon Oct 11 16:13:46 2010
@@ -109,3 +109,32 @@
// CHECK: @g5 = constant [12 x i8] c"^{Object=#}\00"
const char g5[] = @encode(MyObj * const);
+
+////
+
+enum Enum1X { one, two, three, four };
+
+ at interface Base1X {
+ unsigned a: 2;
+ int b: 3;
+ enum Enum1X c: 4;
+ unsigned d: 5;
+}
+ at end
+
+ at interface Derived1X: Base1X {
+ signed e: 5;
+ int f: 4;
+ enum Enum1X g: 3;
+}
+ at end
+
+ at implementation Base1X @end
+
+ at implementation Derived1X @end
+
+// CHECK: @g6 = constant [18 x i8] c"{Base1X=b2b3b4b5}\00"
+const char g6[] = @encode(Base1X);
+
+// CHECK: @g7 = constant [27 x i8] c"{Derived1X=b2b3b4b5b5b4b3}\00"
+const char g7[] = @encode(Derived1X);
More information about the cfe-commits
mailing list