I am somewhat OK with this approach. I think the one item I feel should be done differently is llvm::parseBitcodeFile. It can take just a stringref and build a fake membuf to pass down. Maybe we should do that first (attached patch)? - {F130689, layout=link} http://reviews.llvm.org/D4876