ThinLTO: do not import function whose linkage prevents inlining.
authorMehdi Amini <mehdi.amini@apple.com>
Mon, 2 May 2016 22:11:27 +0000 (22:11 +0000)
committerMehdi Amini <mehdi.amini@apple.com>
Mon, 2 May 2016 22:11:27 +0000 (22:11 +0000)
commitbda9b2ae9e69e5de7ce76e70c9cd6519d90a0226
treed70fbc04e3bbafde54b3b958c73fc59dd3a2842c
parent3ba6535096a4a1abd57f7813183ac8fa0bccfc39
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: 268315
llvm/include/llvm/IR/GlobalValue.h
llvm/lib/Transforms/IPO/FunctionImport.cpp
llvm/test/Transforms/FunctionImport/Inputs/funcimport.ll
llvm/test/Transforms/FunctionImport/funcimport.ll