Commits

Roman Levenstein committed 0b6b907a0ab
Do not produce an intermediate cast between the same ObjC types as it will get eliminated anyways. When casts optimizations were lowering bridged casts from ObjC to Swift, they were producing internally an intermediate cast from an ObjC type into the expected ObjC type of a bridged cast, before converting this expected ObjC type into a Swift type. In many cases, this resulted in a useless intermediate cast where both types were the same and such a cast would be eliminated afterwards. E.g. unconditional_checked_cast A to B // where A is ObjC type and B is a Swift type was lowered into: unconditional_checked_cast A to B. _ObjectiveCType // Often useless as A is equal to B. _ObjectiveCType already. unconditional_checked_cast B._ObjectiveCType to B This small inefficiency is fixed now. This problem was no observable from outside the optimization pass, it just required additional processing, therefore there is no test-case. Swift SVN r27370