ObjCARC: teach the cloner about funclets
authorSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 12 Mar 2018 21:46:09 +0000 (21:46 +0000)
committerSaleem Abdulrasool <compnerd@compnerd.org>
Mon, 12 Mar 2018 21:46:09 +0000 (21:46 +0000)
commit8b342680bf62722e5099074e8bd23491c71d92b3
tree5507c01b3b0e4a6ccf1ead1eee5d0a910fcf78b2
parent5b034c83d655f9dcc7a35bb82d34ac7a2b44db6f
ObjCARC: teach the cloner about funclets

In the case that the CallInst that is being moved has an associated
operand bundle which is a funclet, the move will construct an invalid
instruction.  The new site will have a different token and needs to be
reassociated with the new instruction.

Unfortunately, there is no way to alter the bundle after the
construction of the instruction.  Replace the call instruction cloning
with a custom helper to clone the instruction and reassociate the
funclet token.

llvm-svn: 327336
llvm/lib/Transforms/ObjCARC/ObjCARCOpts.cpp
llvm/test/Transforms/ObjCARC/funclet.ll [new file with mode: 0644]