diff options
| author | Teresa Johnson <tejohnson@google.com> | 2015-11-24 16:10:43 +0000 |
|---|---|---|
| committer | Teresa Johnson <tejohnson@google.com> | 2015-11-24 16:10:43 +0000 |
| commit | 17626654fd454c6fd2a683cb303612a1cda54ef8 (patch) | |
| tree | 9874f6ccffd7201d6a90f7b5b301279209ab98df /llvm/lib/Transforms | |
| parent | b0bb6142f5b837a15b4d2c8031d4074145989fe2 (diff) | |
| download | bcm5719-llvm-17626654fd454c6fd2a683cb303612a1cda54ef8.tar.gz bcm5719-llvm-17626654fd454c6fd2a683cb303612a1cda54ef8.zip | |
[ThinLTO] Fix FunctionImport alias checking and test
Skip imports for weak_any aliases as well. Fix the test to check
non-import of weak aliases and functions, and import of normal alias.
llvm-svn: 253991
Diffstat (limited to 'llvm/lib/Transforms')
| -rw-r--r-- | llvm/lib/Transforms/IPO/FunctionImport.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/llvm/lib/Transforms/IPO/FunctionImport.cpp b/llvm/lib/Transforms/IPO/FunctionImport.cpp index 725796790ea..c874e4f5da7 100644 --- a/llvm/lib/Transforms/IPO/FunctionImport.cpp +++ b/llvm/lib/Transforms/IPO/FunctionImport.cpp @@ -142,11 +142,12 @@ bool FunctionImporter::importFunctions(Module &M) { llvm_unreachable("Can't load function in Module"); } - // We cannot import weak_any functions without possibly affecting the - // order they are seen and selected by the linker, changing program + // We cannot import weak_any functions/aliases without possibly affecting + // the order they are seen and selected by the linker, changing program // semantics. - if (F->hasWeakAnyLinkage()) { - DEBUG(dbgs() << "Ignoring import request for weak-any function " + if (SGV->hasWeakAnyLinkage()) { + DEBUG(dbgs() << "Ignoring import request for weak-any " + << (isa<Function>(SGV) ? "function " : "alias ") << CalledFunctionName << " from " << FileName << "\n"); continue; } |

