mzolotukhin added a comment. Looks like the change I've been asking for function has been committed (see http://reviews.llvm.org/D12090). So, probably we just need to update this patch, and it'll be ok to go in. http://reviews.llvm.org/D15559