[cfe-dev] inspecting emitted blocks code
Abhishek Kulkarni
adkulkar at indiana.edu
Wed Mar 23 18:56:50 PDT 2011
Why are blocks excluded when printing out the AST? Is it a bug?
$ cat foo.c
#include<stdio.h>
int main(int argc, char *argv[])
{
void (^hello)() = ^ { printf("hello world\n"); };
hello();
return 0;
}
$ clang -cc1 -fblocks hello.c -ast-print
int main(int argc, char *argv[]) {
void (^hello)() = ^;
hello();
return 0;
}
In any case, is there a quick way to dump the blocks-specific generated code
(__block_invoke_1, __block_literal_1 etc.)?
Finally, is there a way to reach a block's imported variables without
modifying the compiler?
Thanks,
Abhishek
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20110323/83714150/attachment.html>
More information about the cfe-dev
mailing list