I think Owen was the original author for this code back in 2010. Maybe he has thoughts on how this should work. In particular, the commit logs of r114130 and r114131 look suspicious. http://reviews.llvm.org/D3996