jansvoboda11 wrote: CC @AaronBallman as a last resort. The reason for `CompilerInvocation` not sharing ownership of its sub-objects is given here: https://github.com/llvm/llvm-project/pull/133467#issuecomment-2762065443 https://github.com/llvm/llvm-project/pull/132984