From d2bd9e70b16db88a7808ee2280b0a107afbfdd3b Mon Sep 17 00:00:00 2001 From: Dimitry Andric Date: Wed, 23 Oct 2019 17:52:45 +0000 Subject: Vendor import of stripped lld trunk r375505, the last commit before the upstream Subversion repository was made read-only, and the LLVM project migrated to GitHub: https://llvm.org/svn/llvm-project/lld/trunk@375505 --- ELF/DWARF.cpp | 26 +++++++++++++++----------- 1 file changed, 15 insertions(+), 11 deletions(-) (limited to 'ELF/DWARF.cpp') diff --git a/ELF/DWARF.cpp b/ELF/DWARF.cpp index 1e4b36f71b54..a00189a0e3a2 100644 --- a/ELF/DWARF.cpp +++ b/ELF/DWARF.cpp @@ -22,9 +22,9 @@ using namespace llvm; using namespace llvm::object; -using namespace lld; -using namespace lld::elf; +namespace lld { +namespace elf { template LLDDwarfObj::LLDDwarfObj(ObjFile *obj) { for (InputSectionBase *sec : obj->getSections()) { if (!sec) @@ -33,11 +33,12 @@ template LLDDwarfObj::LLDDwarfObj(ObjFile *obj) { if (LLDDWARFSection *m = StringSwitch(sec->name) .Case(".debug_addr", &addrSection) - .Case(".debug_gnu_pubnames", &gnuPubNamesSection) - .Case(".debug_gnu_pubtypes", &gnuPubTypesSection) + .Case(".debug_gnu_pubnames", &gnuPubnamesSection) + .Case(".debug_gnu_pubtypes", &gnuPubtypesSection) .Case(".debug_info", &infoSection) - .Case(".debug_ranges", &rangeSection) - .Case(".debug_rnglists", &rngListsSection) + .Case(".debug_ranges", &rangesSection) + .Case(".debug_rnglists", &rnglistsSection) + .Case(".debug_str_offsets", &strOffsetsSection) .Case(".debug_line", &lineSection) .Default(nullptr)) { m->Data = toStringRef(sec->data()); @@ -50,7 +51,7 @@ template LLDDwarfObj::LLDDwarfObj(ObjFile *obj) { else if (sec->name == ".debug_str") strSection = toStringRef(sec->data()); else if (sec->name == ".debug_line_str") - lineStringSection = toStringRef(sec->data()); + lineStrSection = toStringRef(sec->data()); } } @@ -123,7 +124,10 @@ Optional LLDDwarfObj::find(const llvm::DWARFSection &s, return findAux(*sec.sec, pos, sec.sec->template rels()); } -template class elf::LLDDwarfObj; -template class elf::LLDDwarfObj; -template class elf::LLDDwarfObj; -template class elf::LLDDwarfObj; +template class LLDDwarfObj; +template class LLDDwarfObj; +template class LLDDwarfObj; +template class LLDDwarfObj; + +} // namespace elf +} // namespace lld -- cgit v1.2.3