The amount of change here is very large - seems like you combined the functional fixes with some refactoring. It would be helpful if the commit message went into more detail about the refactoring as well. http://reviews.llvm.org/D3985