mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
LLVM r355981 changed various intrinsic functions, including expect, to require immediate arguments. Swift's _branchHint function has an expected value that is passed in as an argument, so that it cannot use LLVM's expect intrinsic. The good news is that _branchHint is only ever used with immediate arguments, so we can just move the intrinsic into _fastPath and _slowPath and use those instead of _branchHint. As was noted in the documentation, the _fastPath and _slowPath names are confusing but we have passed the point where we can simply rename them. We could add new names but would still need to keep the old ones around for binary compatibility, and it is not clear that it is worth the trouble. I have removed that note from the documentation.
4.9 KiB
4.9 KiB