summaryrefslogtreecommitdiff
path: root/ELF/MapFile.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ELF/MapFile.cpp')
-rw-r--r--ELF/MapFile.cpp15
1 files changed, 6 insertions, 9 deletions
diff --git a/ELF/MapFile.cpp b/ELF/MapFile.cpp
index 806e99e3d9dd..e0c7d8cd8b1b 100644
--- a/ELF/MapFile.cpp
+++ b/ELF/MapFile.cpp
@@ -100,7 +100,7 @@ getSymbolStrings(ArrayRef<DefinedRegular *> Syms) {
}
template <class ELFT>
-void elf::writeMapFile(llvm::ArrayRef<BaseCommand *> Script) {
+void elf::writeMapFile(llvm::ArrayRef<OutputSectionCommand *> Script) {
if (Config->MapFile.empty())
return;
@@ -123,10 +123,7 @@ void elf::writeMapFile(llvm::ArrayRef<BaseCommand *> Script) {
<< " Align Out In Symbol\n";
// Print out file contents.
- for (BaseCommand *Base : Script) {
- auto *Cmd = dyn_cast<OutputSectionCommand>(Base);
- if (!Cmd)
- continue;
+ for (OutputSectionCommand *Cmd : Script) {
OutputSection *OSec = Cmd->Sec;
writeHeader<ELFT>(OS, OSec->Addr, OSec->Size, OSec->Alignment);
OS << OSec->Name << '\n';
@@ -147,7 +144,7 @@ void elf::writeMapFile(llvm::ArrayRef<BaseCommand *> Script) {
}
}
-template void elf::writeMapFile<ELF32LE>(ArrayRef<BaseCommand *>);
-template void elf::writeMapFile<ELF32BE>(ArrayRef<BaseCommand *>);
-template void elf::writeMapFile<ELF64LE>(ArrayRef<BaseCommand *>);
-template void elf::writeMapFile<ELF64BE>(ArrayRef<BaseCommand *>);
+template void elf::writeMapFile<ELF32LE>(ArrayRef<OutputSectionCommand *>);
+template void elf::writeMapFile<ELF32BE>(ArrayRef<OutputSectionCommand *>);
+template void elf::writeMapFile<ELF64LE>(ArrayRef<OutputSectionCommand *>);
+template void elf::writeMapFile<ELF64BE>(ArrayRef<OutputSectionCommand *>);