mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-02-22 13:29:44 +00:00
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:
parent
05c096b953
commit
9423af6b70
@ -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();
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user