ThinLTO: do not import function whose linkage prevents inlining.
authorMehdi Amini <mehdi.amini@apple.com>
Tue, 3 May 2016 00:27:28 +0000 (00:27 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Tue, 3 May 2016 00:27:28 +0000 (00:27 +0000)
commit5b85d8d67b28f082db53863a922895211a01baa2
tree439413643e4744cf4ba7a2ba178e6de3bcff7242
parentd1aabb28134a7e72ce4d6ac26b093648f5c57e88
ThinLTO: do not import function whose linkage prevents inlining.

There is not point in importing a "weak" or a "linkonce" function
since we won't be able to inline it anyway.
We already had a targeted check for WeakAny, this is using the
same check on GlobalValue as the inline, i.e.
isMayBeOverriddenLinkage()

From: Mehdi Amini <mehdi.amini@apple.com>
llvm-svn: 268341
llvm/include/llvm/IR/GlobalValue.h
llvm/lib/Transforms/IPO/FunctionImport.cpp
llvm/test/ThinLTO/X86/alias_import.ll
llvm/test/Transforms/FunctionImport/Inputs/funcimport.ll
llvm/test/Transforms/FunctionImport/funcimport.ll