2 // The LLVM Compiler Infrastructure
4 // This file is distributed under the University of Illinois Open Source
5 // License. See LICENSE.TXT for details.
11 * Created by Blaine Garst on 9/30/08.
15 #include <Block_private.h>
20 int main(int argc
, char *argv
[]) {
25 } localStuff
= { 10, 20, 30 };
28 void (^a
)(void) = ^ { printf("d is %d", d
); };
29 void (^b
)(void) = ^ { printf("d is %d, localStuff.a is %lu", d
, localStuff
.a
); };
31 unsigned nominalsize
= Block_size(b
) - Block_size(a
);
33 // need copy+dispose helper for C++ structures
34 nominalsize
+= 2*sizeof(void*);
36 if ((Block_size(b
) - Block_size(a
)) != nominalsize
) {
37 printf("sizeof a is %ld, sizeof b is %ld, expected %d\n", Block_size(a
), Block_size(b
), nominalsize
);
38 printf("dump of b is %s\n", _Block_dump(b
));
41 printf("%s: Success\n", argv
[0]);