Commit Graph

3 Commits

Author SHA1 Message Date
Arnold Schwaighofer
75a82d7a7c XFAIL i386 the autorelease return optimization seems to be defunct 2017-10-06 13:04:03 -07:00
Arnold Schwaighofer
513303fd63 Also fix and test uppercased and lowercased 2017-10-06 13:04:03 -07:00
Arnold Schwaighofer
ec5f40f12f runtime: Move String implementation stubs that want need the auto-released return value optimization to an ARC compiled file
String's hashValue function is implemented in terms of Foundation's hash
function in a runtime function on darwin platforms. For non-ASCII strings we
will call str.decomposedStringWithCanonicalMapping inside this runtime function
which will allocate a new NSString and return the result in the current
autorelease pool. We implemented this function in a file compiled without ARC.
This meant that we would leak said NSString into the current active autorelease
pool.
This patch moves the implementation to a file compiled with ARC. ARC will insert
objc_retainAutoreleasedReturnValue call and on platforms that require it an
marker for the hand-off of the autoreleased return value optimization.

SR-4889
rdar://32199117
2017-10-06 11:12:22 -07:00