michaelrj-google wrote: I missed that https://github.com/llvm/llvm-project/pull/74259 existed when I created this patch. It's more complete and supersedes this patch. https://github.com/llvm/llvm-project/pull/74356