From 774ea7d0a945cd328ac31526d3daa212116131bb Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Thu, 23 Feb 2017 16:49:07 +0000 Subject: Make InputSection a class. NFC. With the current design an InputSection is basically anything that goes directly in a OutputSection. That includes plain input section but also synthetic sections, so this should probably not be a template. llvm-svn: 295993 --- lld/ELF/MapFile.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'lld/ELF/MapFile.cpp') diff --git a/lld/ELF/MapFile.cpp b/lld/ELF/MapFile.cpp index 9f128f66f24..4e28fabfa04 100644 --- a/lld/ELF/MapFile.cpp +++ b/lld/ELF/MapFile.cpp @@ -61,7 +61,7 @@ static void writeSymbolLine(raw_fd_ostream &OS, int Width, uint64_t Address, } template -static void writeInputSection(raw_fd_ostream &OS, const InputSection *IS, +static void writeInputSection(raw_fd_ostream &OS, const InputSection *IS, StringRef &PrevName) { int Width = ELFT::Is64Bits ? 16 : 8; StringRef Name = IS->Name; @@ -108,8 +108,8 @@ static void writeMapFile2(raw_fd_ostream &OS, StringRef PrevName = ""; Sec->forEachInputSection([&](InputSectionBase *S) { - if (const auto *IS = dyn_cast>(S)) - writeInputSection(OS, IS, PrevName); + if (const auto *IS = dyn_cast(S)) + writeInputSection(OS, IS, PrevName); }); } } -- cgit v1.2.3