MergeFunc: Transfer the callee's attributes when replacing a direct caller
authorArnold Schwaighofer <aschwaighofer@apple.com>
Tue, 21 Jul 2015 17:07:07 +0000 (17:07 +0000)
committerArnold Schwaighofer <aschwaighofer@apple.com>
Tue, 21 Jul 2015 17:07:07 +0000 (17:07 +0000)
commita5aae48d178b34160b8cdb9bb36c12c6b56d7b48
tree8102c51384b7ec540697abf59b3eba00271f5d75
parent65671bf628ba93e4a443d5f01c00fed16ec66be9
MergeFunc: Transfer the callee's attributes when replacing a direct caller

We insert a bitcast which obfuscates the getCalledFunction for the utility
function which looks up attributes from the called function. Loosing ABI
changing parameter attributes is a bad thing.

rdar://21516488

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@242807 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Transforms/IPO/MergeFunctions.cpp
test/Transforms/MergeFunc/apply_function_attributes.ll [new file with mode: 0644]