preames wrote: I pulled out a subset of this into https://github.com/llvm/llvm-project/pull/170721 with the goal of getting some of the API changes in, and then returning to the enum/union bits in this change. https://github.com/llvm/llvm-project/pull/168869