ObjC IR generation for Blocks currently:
I. Generates local to block variable declaration block literal in case it contains captures.
II. Global variable block literal in case it doesn't have any captures.
The address spaces are missing however if we use this generation for OpenCL.
This patch:
- keeps default private address space for blocks generated as local variables (case I from above);
- adds global address space for global block literals (case II from the above);
- makes the block invoke function and enqueue_kernel prototype with the generic AS block pointer parameter to accommodate both private and global AS cases.
- adds block handling into default AS because it's implemented as a special pointer type (BlockPointer) in the frontend and therefore it is used as a pointer everywhere. This is also needed to accommodate both private and global address space blocks for the two cases described above.
- removes ObjC RT specific symbols (NSConcreteStackBlock and NSConcreteGlobalBlock) in the OpenCL mode.
should use CGM.getNullPointer to create a null pointer.