alexfh accepted this revision. alexfh added a comment. This revision is now accepted and ready to land. Looks good. Please ensure it works reasonably on LLVM code before submitting. Sorry for the delay. Feel free to ping earlier. https://reviews.llvm.org/D21134