HomePhabricator

Fix assert in ObjCARC optimizer when deleting retainBlock of null or undef.

Authored by pete on Jan 2 2019, 1:00 PM.

Description

Fix assert in ObjCARC optimizer when deleting retainBlock of null or undef.

The caller to EraseInstruction had this conditional:

// ARC calls with null are no-ops. Delete them.
if (IsNullOrUndef(Arg))

but the assert inside EraseInstruction only allowed ConstantPointerNull and not
undef or bitcasts.

This adds support for both of these cases.

rdar://problem/47003805

llvm-svn: 350261

Details

Committed
peteJan 2 2019, 1:00 PM
Parents
rG88590e99f275: [WebAssembly][NFC] Elaborate on simd-noopt test comment
Branches
Unknown
Tags
Unknown