diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2008-12-20 19:17:01 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2008-12-20 19:17:01 +0000 |
| commit | 7acf0749d45584f0984e174c763505920faebcf9 (patch) | |
| tree | 06d327e4a51254121b1838d8167ae602c79da66f /clang/test/CodeGenObjC | |
| parent | ab316350bfe4b17b404cace73c0d77f0d6d09a63 (diff) | |
| download | bcm5719-llvm-7acf0749d45584f0984e174c763505920faebcf9.tar.gz bcm5719-llvm-7acf0749d45584f0984e174c763505920faebcf9.zip | |
Strangely enough, name of ObjC class is not encoded into the
full encoding of the class which has an ivar of pointer to this
class. Its name is encoded in the type for the ivar in the
ivar-list metadata. This patch conforms to the above rule.
llvm-svn: 61282
Diffstat (limited to 'clang/test/CodeGenObjC')
| -rw-r--r-- | clang/test/CodeGenObjC/encode-test.m | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/clang/test/CodeGenObjC/encode-test.m b/clang/test/CodeGenObjC/encode-test.m index 982faf03bad..109f0573e52 100644 --- a/clang/test/CodeGenObjC/encode-test.m +++ b/clang/test/CodeGenObjC/encode-test.m @@ -1,6 +1,7 @@ // RUN: clang -fnext-runtime -emit-llvm -o %t %s && // RUN: grep -e "\^{Innermost=CC}" %t | count 1 && -// RUN: grep -e "{Derived=#ib32b8b3b8sb16b8b8b2b8ccb6}" %t | count 1 +// RUN: grep -e "{Derived=#ib32b8b3b8sb16b8b8b2b8ccb6}" %t | count 1 && +// RUN: grep -e "{B1=#@c}" %t | count 1 @class Int1; @@ -48,8 +49,20 @@ struct Innermost { @implementation Derived @end +@interface B1 +{ + struct objc_class *isa; + Int1 *sBase; + char c; +} +@end + +@implementation B1 +@end + int main() { const char *en = @encode(Derived); + const char *eb = @encode(B1); } |

