diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2008-12-19 23:34:38 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2008-12-19 23:34:38 +0000 |
| commit | 1d35f12e6b571fd1a4c5a86a8631ae50a86a3b75 (patch) | |
| tree | 63222f9b6ffabd23d40268e434cee47b74cdc7f9 /clang/test/CodeGenObjC | |
| parent | 7be667c075cf5194a85f3829bc4e31acb40b5c5d (diff) | |
| download | bcm5719-llvm-1d35f12e6b571fd1a4c5a86a8631ae50a86a3b75.tar.gz bcm5719-llvm-1d35f12e6b571fd1a4c5a86a8631ae50a86a3b75.zip | |
More encoding support. This time for
@encode of classes and bitfields.
llvm-svn: 61268
Diffstat (limited to 'clang/test/CodeGenObjC')
| -rw-r--r-- | clang/test/CodeGenObjC/encode-test.m | 40 |
1 files changed, 39 insertions, 1 deletions
diff --git a/clang/test/CodeGenObjC/encode-test.m b/clang/test/CodeGenObjC/encode-test.m index f5b6b920711..982faf03bad 100644 --- a/clang/test/CodeGenObjC/encode-test.m +++ b/clang/test/CodeGenObjC/encode-test.m @@ -1,5 +1,6 @@ // RUN: clang -fnext-runtime -emit-llvm -o %t %s && -// RUN: grep -e "\^{Innermost=CC}" %t | count 1 +// RUN: grep -e "\^{Innermost=CC}" %t | count 1 && +// RUN: grep -e "{Derived=#ib32b8b3b8sb16b8b8b2b8ccb6}" %t | count 1 @class Int1; @@ -15,3 +16,40 @@ struct Innermost { @implementation Int1 @end + +@interface Base +{ + struct objc_class *isa; + int full; + int full2: 32; + int _refs: 8; + int field2: 3; + unsigned f3: 8; + short cc; + unsigned g: 16; + int r2: 8; + int r3: 8; + int r4: 2; + int r5: 8; + char c; +} +@end + +@interface Derived: Base +{ + char d; + int _field3: 6; +} +@end + +@implementation Base +@end + +@implementation Derived +@end + +int main() +{ + const char *en = @encode(Derived); +} + |

