jfb added a comment. This now passes all tests with `ninja check` on a build with all backends, and seems to do what I want! I'll clean up the code a bit, test it on Chrome some more (including the issue I posted above). http://reviews.llvm.org/D15157