1/*
2 * Copyright (c) 2010 Apple Inc. All rights reserved.
3 *
4 * @APPLE_LLVM_LICENSE_HEADER@
5 */
6
7//
8//  escape2.m
9//  btest
10//
11//  Created by Apple on 6/12/08.
12//  Copyright 2008 __MyCompanyName__. All rights reserved.
13//
14
15
16#import "common.h"
17
18
19
20
21void test(void) {
22	// validate that escaping a context is enough
23	int counter = 0;
24	while (counter < 10) {
25		BYREF int i = 0;
26		vv block = ^{  ++i; };
27		if (counter > 5) {
28			lastUse(i);
29			break;
30		}
31		++counter;
32		lastUse(i);
33	}
34}
35