mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
It returns the argument and specifies that the value is not negative. It has only an effect if the argument is a load or call. The effect of this builtin is that for the load/call argument a positive range metadata is created in llvm ir. I also added a public function _assumeNonNegative(x: Int) -> Int in the stdlib. To be on the save side, I prefixed it with an underscore. But maybe it makes sense to make it available for all users. Swift SVN r23582
12 KiB
12 KiB