diff options
author | Michael Ilseman <milseman@apple.com> | 2014-12-09 08:20:06 +0000 |
---|---|---|
committer | Michael Ilseman <milseman@apple.com> | 2014-12-09 08:20:06 +0000 |
commit | 2770c2d6d4c8e57b452f27a9ae79b1556f5be6ab (patch) | |
tree | 096b8f892e72522aaa8eca5b4e9cb47adfeacac6 /llvm/lib/Linker/LinkModules.cpp | |
parent | 8a417c1fabc72c685621bff3ce8d2621e9324de5 (diff) | |
download | bcm5719-llvm-2770c2d6d4c8e57b452f27a9ae79b1556f5be6ab.tar.gz bcm5719-llvm-2770c2d6d4c8e57b452f27a9ae79b1556f5be6ab.zip |
Skip declarations in the case of functions.
This is a revert of r223521 in spirit, if not in content. I am not
sure why declarations ended up in LazilyLinkGlobalValues in the first
place; that will take some more investigation.
llvm-svn: 223763
Diffstat (limited to 'llvm/lib/Linker/LinkModules.cpp')
-rw-r--r-- | llvm/lib/Linker/LinkModules.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/llvm/lib/Linker/LinkModules.cpp b/llvm/lib/Linker/LinkModules.cpp index bf07644870a..dd637be05aa 100644 --- a/llvm/lib/Linker/LinkModules.cpp +++ b/llvm/lib/Linker/LinkModules.cpp @@ -1533,6 +1533,9 @@ bool ModuleLinker::run() { GlobalValue *SGV = LazilyLinkGlobalValues.back(); LazilyLinkGlobalValues.pop_back(); + if (auto F = dyn_cast<Function>(SGV)) + if (F->isDeclaration()) + continue; if (linkGlobalValueBody(*SGV)) return true; } |