Also map the personality function in CloneFunctionInto
authorKeno Fischer <kfischer@college.harvard.edu>
Mon, 16 Nov 2015 05:13:30 +0000 (05:13 +0000)
committerKeno Fischer <kfischer@college.harvard.edu>
Mon, 16 Nov 2015 05:13:30 +0000 (05:13 +0000)
commit48f4451501be4ef0208f8c70e3565a4bf21175b7
tree960a75d60c4f7b1b62f83cb6b998d3bdaf3afebf
parent888d479702d42688f55399530f867d2db118ffaa
Also map the personality function in CloneFunctionInto

Summary: The Old personality function gets copied over, but the
Materializer didn't  have a chance to inspect it (e.g. to fix up
references to the correct module for the target function).
Also add a verifier check that makes sure the personality routine
is in the same module as the function whose personality it is.

Reviewers: majnemer

Subscribers: jevinskie, llvm-commits

Differential Revision: http://reviews.llvm.org/D14474

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@253183 91177308-0d34-0410-b5e6-96231b3b80d8
lib/IR/Verifier.cpp
lib/Transforms/Utils/CloneFunction.cpp