Are you sure you're synced to the latest version? http://reviews.llvm.org/rL209652 If your solution works, I like it more (I tried, but didn't get it to compile :P), but it needs to be based on head ;) http://reviews.llvm.org/D3994