t.p.northover accepted this revision. t.p.northover added a reviewer: t.p.northover. t.p.northover added a comment. This revision is now accepted and ready to land. Thanks for the generic solution Simon, this looks good to me. Tim. http://reviews.llvm.org/D18356