Commits

Erik Eckstein committed 54e1071da0b
Add a builtin assumeNonNegative. 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