michaelrj-google wrote: I think the overall idea is good, but I don't think that `WriteBuffer` needs to be refactored for this. It should be possible to add this with minimal changes to `WriteBuffer`. https://github.com/llvm/llvm-project/pull/98824