beanz added a comment. There is actually a refactoring of this code being reviewed at the moment, which should address this issue. See https://reviews.llvm.org/D25304. https://reviews.llvm.org/D25382