[lld] r335958 - [ELF] - Remove dead code.
George Rimar via llvm-commits
llvm-commits at lists.llvm.org
Fri Jun 29 02:54:51 PDT 2018
Author: grimar
Date: Fri Jun 29 02:54:51 2018
New Revision: 335958
URL: http://llvm.org/viewvc/llvm-project?rev=335958&view=rev
Log:
[ELF] - Remove dead code.
I do not think this code was ever alive,
because the following code says we can have OutputSection and
SymbolAssignment cases only. We already handle both of them.
https://github.com/llvm-mirror/lld/blob/master/ELF/ScriptParser.cpp#L502
FWIW, it is dead in the LLD code coverage reports I am running either.
Modified:
lld/trunk/ELF/MapFile.cpp
Modified: lld/trunk/ELF/MapFile.cpp
URL: http://llvm.org/viewvc/llvm-project/lld/trunk/ELF/MapFile.cpp?rev=335958&r1=335957&r2=335958&view=diff
==============================================================================
--- lld/trunk/ELF/MapFile.cpp (original)
+++ lld/trunk/ELF/MapFile.cpp Fri Jun 29 02:54:51 2018
@@ -174,9 +174,6 @@ void elf::writeMapFile() {
}
auto *OSec = dyn_cast<OutputSection>(Base);
- if (!OSec)
- continue;
-
writeHeader(OS, OSec->Addr, OSec->getLMA(), OSec->Size, OSec->Alignment);
OS << OSec->Name << '\n';
More information about the llvm-commits
mailing list