Does LLVM provide support for Apple-style blocks? Or is that all implemented in clang using LLVM primitives? I'm looking at the IR that clang generates, and it sure seems confusing to me. I'm hoping there's a builder that can help me implement them.
You’ll want to look at clang/lib/CodeGen/CGBlocks.[cpp, h].
I think proper blocks are way over my head for my little project. I'll try to implement something "block-like" using function pointers.
You could take a look at the lambda implementation which (In my mind) is a little easier to grok. It’s unified with a lot of the blocks infrastructure, but not too bad.