[llvm] r223763 - Skip declarations in the case of functions.
Michael Ilseman
milseman at apple.com
Tue Dec 9 00:20:06 PST 2014
Author: milseman
Date: Tue Dec 9 02:20:06 2014
New Revision: 223763
URL: http://llvm.org/viewvc/llvm-project?rev=223763&view=rev
Log:
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.
Modified:
llvm/trunk/lib/Linker/LinkModules.cpp
Modified: llvm/trunk/lib/Linker/LinkModules.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/Linker/LinkModules.cpp?rev=223763&r1=223762&r2=223763&view=diff
==============================================================================
--- llvm/trunk/lib/Linker/LinkModules.cpp (original)
+++ llvm/trunk/lib/Linker/LinkModules.cpp Tue Dec 9 02:20:06 2014
@@ -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;
}
More information about the llvm-commits
mailing list