HomePhabricator

Only convert objc messages to alloc to objc_alloc if the receiver is a class.

Authored by pete on Jan 2 2019, 9:25 AM.

Description

Only convert objc messages to alloc to objc_alloc if the receiver is a class.

r348687 converted [Foo alloc] to objc_alloc(Foo). However the objc runtime method only takes a Class, not an arbitrary pointer.

This makes sure we are messaging a class before we convert these messages.

rdar://problem/46943703

llvm-svn: 350224

Details

Committed
peteJan 2 2019, 9:25 AM
Parents
rGecc89b76cb8f: [PowerPC] Remove SeenUse check when optimizing conditional branch in…
Branches
Unknown
Tags
Unknown