efriedma-quic wrote: The general approach here seems fine; there are some special-cases you could optimize, but we can leave that for a followup. Please refactor the copy-pasted code so the relevant codepaths are shared. https://github.com/llvm/llvm-project/pull/92560