This is required for backporting r311659 to the 5.0.1 release, which is a prerequisite for backporting support for Qualcomm's Saphira CPU to the 5.0.1 release.
PR35060
Details
Diff Detail
Event Timeline
Would it make sense to add a test, so that any future changes doesn't undo this behaviour?
rL311659 (which reordered the enum in the first place) already has test coverage, however, I don't think that's the kind of testing you're suggesting.
I think what you're suggesting is that we add unit tests to ensure the enums don't get reordered. AFAIK, we don't have a hard/fast rule for this (I could easily be mistaken). IIUC the issue only arises when you want to backport a change so that, for example, the libLLVM.so shipped with the 5.0.0 release is compatible with the 5.0.1 release. I don't know if we ensure major releases are compatible with this respect to one another.
Do you have any thoughts on this, Renato?
Been there, done that. :)
I don't think we need tests for testing the ordering. The original patch already had tests, we should be fine.
Also, this would be good to be on trunk as well as 5.0. We can't break binary compatibility between dot-releases, but we shouldn't do so on normal releases either, unless there's a reason.
--renato