Remove dead code. We are only lazy about functions with bodies.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223521 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Rafael Espindola 2014-12-05 21:36:06 +00:00
parent 05c096b953
commit 9423af6b70

View File

@ -1518,9 +1518,6 @@ bool ModuleLinker::run() {
Function *SF = LazilyLinkFunctions.back();
LazilyLinkFunctions.pop_back();
if (!SF)
continue;
Function *DF = cast<Function>(ValueMap[SF]);
if (SF->hasPrefixData()) {
// Link in the prefix data.
@ -1532,11 +1529,8 @@ bool ModuleLinker::run() {
if (std::error_code EC = SF->materialize())
return emitError(EC.message());
// Skip if no body (function is external).
if (SF->isDeclaration())
continue;
// Link in function body.
assert(!SF->isDeclaration());
linkFunctionBody(DF, SF);
SF->Dematerialize();
}