I agree that this is the right direction, and I'd like to see the three patches split out. I'm totally fine with the third patch being large, since I expect it will be straightforward code that won't take that long to review. http://llvm-reviews.chandlerc.com/D52