We’re seeing that the ObjCARCContract pass never runs in llc (at any optimization level!) when bitcode is lowered to assembly. As a result, ARC-enabled code becomes unlinkable. We can run the pass manually, but it’d be preferred to have this rolled somewhere logical like pass configuration.
I see that there was a previous discussion about how to appropriately remove them. Did anything ever come about?
I’ve attempted running the pass “always” per the original discussion. While that works for me, I doubt it’s acceptable for all languages, targets, etc. See my strawman patch.
Any recommendations on a smaller hammer fix that would be upstreamable? I like the idea of a cleanup pass, but even that seems too special case.
ObjCARCContractStrawman.patch (722 Bytes)
ATT00001.htm (216 Bytes)