pcc added a comment. http://reviews.llvm.org/D10946 makes a similar change to the C API. It's ready to land, so you could commit it and update this change to use it instead. http://reviews.llvm.org/D11116