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)
commit36512330041201e10f5429361bbd79b1afac1ea1
treea1a2d96e0340877e367858cd50b39b7edd67a9cb
parent6ede37442d263084bc48d6a8e9c9c728c44f583b
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

llvm-svn: 242807
llvm/lib/Transforms/IPO/MergeFunctions.cpp
llvm/test/Transforms/MergeFunc/apply_function_attributes.ll [new file with mode: 0644]