mirror of
https://github.com/intel/llvm.git
synced 2026-01-13 19:08:21 +08:00
The macos and sysv ABIs return functionally equivalent unwind plans, so they can be implemented in the base AArch64 class. The only difference between them was that the macos plan provided a "pc=lr" rule whereas the sysv plan called SetReturnAddressRegister (which causes the unwind machinery to act as if that rule was present). This difference was enough to cause `CompareUnwindPlansForIdenticalInitialPCLocation` to return a different value and break the (temporarily reverted) TestUnwindFramelessFaulted test. While merging the two functions, I couldn't stop myself from simplifying them to use the generic register number schemes -- which exposed another bug in CompareUnwindPlansForIdenticalInitialPCLocation, namely that it was expecting all unwind plans to use the LLDB numbering scheme. This patch fixes that as well.