projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
05c096b
)
Remove dead code. We are only lazy about functions with bodies.
author
Rafael Espindola
<rafael.espindola@gmail.com>
Fri, 5 Dec 2014 21:36:06 +0000
(21:36 +0000)
committer
Rafael Espindola
<rafael.espindola@gmail.com>
Fri, 5 Dec 2014 21:36:06 +0000
(21:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@223521
91177308
-0d34-0410-b5e6-
96231b3b80d8
lib/Linker/LinkModules.cpp
patch
|
blob
|
history
diff --git
a/lib/Linker/LinkModules.cpp
b/lib/Linker/LinkModules.cpp
index c7cf9f6900351f5e19b590c0d04f383332168c05..de62c3b94d05809a0075bf4b7e4900d8de1d988b 100644
(file)
--- a/
lib/Linker/LinkModules.cpp
+++ b/
lib/Linker/LinkModules.cpp
@@
-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();
}