mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-01-29 16:12:44 +00:00
Testcase for 6522054.
llvm-svn: 63067
This commit is contained in:
parent
e00d746487
commit
af1396e17b
14
test/FrontendObjC/2009-01-26-WriteBarrier-2.m
Normal file
14
test/FrontendObjC/2009-01-26-WriteBarrier-2.m
Normal file
@ -0,0 +1,14 @@
|
||||
// RUN: %llvmgcc -x objective-c -S %s -fobjc-gc -o - | grep objc_assign_strongCast
|
||||
// rdar://5541393
|
||||
|
||||
typedef struct {
|
||||
void (^ivarBlock)(void);
|
||||
} StructWithBlock_t;
|
||||
|
||||
int main(char *argc, char *argv[]) {
|
||||
StructWithBlock_t *swbp = (StructWithBlock_t *)malloc(sizeof(StructWithBlock_t*));
|
||||
__block int i = 10;
|
||||
// assigning a Block into an struct slot should elicit a write-barrier under GC
|
||||
swbp->ivarBlock = ^ { ++i; };
|
||||
return 0;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user