Skip to content
Commit 295570a1 authored by Steve Naroff's avatar Steve Naroff
Browse files

Add a couple fixes for rewriting ivars/methods that use/contain blocks.

Now this:

@interface Test
{
  void (^ivar)(void);
}
- (void)name;
@end

@implementation Test
- (void)name {
  ivar = ^{ printf("hello\n"); }; // ((struct Test_IMPL *)self)->ivar = (void (*)(void))&__name_block_impl_0((void *)__name_block_func_0);
  ivar(); // ((void (*)(struct __block_impl *))((struct __block_impl *)((struct Test_IMPL *)self)->ivar)->FuncPtr)((struct __block_impl *)((struct Test_IMPL *)self)->ivar); 
}

llvm-svn: 58428
parent 350b6656
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment