[ELF] - Remove dead code.
authorGeorge Rimar <grimar@accesssoftek.com>
Fri, 29 Jun 2018 09:54:51 +0000 (09:54 +0000)
committerGeorge Rimar <grimar@accesssoftek.com>
Fri, 29 Jun 2018 09:54:51 +0000 (09:54 +0000)
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.

llvm-svn: 335958

lld/ELF/MapFile.cpp

index c5984c9..2802691 100644 (file)
@@ -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';