diff options
| author | Fariborz Jahanian <fjahanian@apple.com> | 2009-11-12 20:14:24 +0000 |
|---|---|---|
| committer | Fariborz Jahanian <fjahanian@apple.com> | 2009-11-12 20:14:24 +0000 |
| commit | eb80c98a72a6ebd660e8a86a11a6200897e98983 (patch) | |
| tree | 53e1f269985a3b868aa24f2772d386cee8a3e51f /clang/test/CodeGenObjC/super-message-fragileabi.m | |
| parent | 33935767b9eb67f20bf65b84e1a5589f0e6a8de1 (diff) | |
| download | bcm5719-llvm-eb80c98a72a6ebd660e8a86a11a6200897e98983.tar.gz bcm5719-llvm-eb80c98a72a6ebd660e8a86a11a6200897e98983.zip | |
Fix a code gen bug in i386-apple-darwin (objc fragile abi), sending
message to 'super'. Fixes radar 7205866.
llvm-svn: 87017
Diffstat (limited to 'clang/test/CodeGenObjC/super-message-fragileabi.m')
| -rw-r--r-- | clang/test/CodeGenObjC/super-message-fragileabi.m | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/clang/test/CodeGenObjC/super-message-fragileabi.m b/clang/test/CodeGenObjC/super-message-fragileabi.m new file mode 100644 index 00000000000..edc26a1157f --- /dev/null +++ b/clang/test/CodeGenObjC/super-message-fragileabi.m @@ -0,0 +1,32 @@ +// RUN: clang-cc -triple i386-apple-darwin9 -emit-llvm %s -o - | FileCheck %s + +@class Some; + +@protocol Proto +- (id)initSome:(Some *)anArg; +@end + + +@interface Table <Proto> +@end + +@interface BetterTable: Table + +- (id)initSome:(Some *)arg; + +@end + +@implementation BetterTable + +- (id)initSome:(Some *)arg { + + if(self=[super initSome:arg]) + { + ; + } +// CHECK: load %struct._objc_class** getelementptr inbounds (%struct._objc_class* @"\01L_OBJC_CLASS_BetterTable", i32 0, i32 1) + + return self; +} +@end + |

