[PATCH] D35193: [DWARF] - Remove unused code.
David Blaikie via llvm-commits
llvm-commits at lists.llvm.org
Mon Jul 10 10:02:26 PDT 2017
Wouldn't mind hearing from Wolgang to double check the motivation here -
but yeah, it's dead, can easily be readded when there's a use for it.
On Mon, Jul 10, 2017 at 9:57 AM Rafael Avila de Espindola <
rafael.espindola at gmail.com> wrote:
> LGTM
>
> George Rimar via Phabricator <reviews at reviews.llvm.org> writes:
>
> > grimar created this revision.
> >
> > This was added in https://reviews.llvm.org/D32779, but I think it was
> unused from begining,
> > because `Name` (prev 'name') variable is never accessed after
> `Obj.mapDebugSectionName()` call.
> > Looks we can remove it.
> >
> >
> > https://reviews.llvm.org/D35193
> >
> > Files:
> > include/llvm/Object/MachO.h
> > include/llvm/Object/ObjectFile.h
> > lib/DebugInfo/DWARF/DWARFContext.cpp
> > lib/Object/MachOObjectFile.cpp
> >
> >
> > Index: lib/Object/MachOObjectFile.cpp
> > ===================================================================
> > --- lib/Object/MachOObjectFile.cpp
> > +++ lib/Object/MachOObjectFile.cpp
> > @@ -4335,9 +4335,3 @@
> > return make_error<GenericBinaryError>("Unrecognized MachO magic
> number",
> >
> object_error::invalid_file_type);
> > }
> > -
> > -StringRef MachOObjectFile::mapDebugSectionName(StringRef Name) const {
> > - return StringSwitch<StringRef>(Name)
> > - .Case("debug_str_offs", "debug_str_offsets")
> > - .Default(Name);
> > -}
> > Index: lib/DebugInfo/DWARF/DWARFContext.cpp
> > ===================================================================
> > --- lib/DebugInfo/DWARF/DWARFContext.cpp
> > +++ lib/DebugInfo/DWARF/DWARFContext.cpp
> > @@ -978,10 +978,6 @@
> > TypesDWOSections[Section].Data = Data;
> > }
> >
> > - // Map platform specific debug section names to DWARF standard
> section
> > - // names.
> > - Name = Obj.mapDebugSectionName(Name);
> > -
> > if (RelocatedSection == Obj.section_end())
> > continue;
> >
> > Index: include/llvm/Object/ObjectFile.h
> > ===================================================================
> > --- include/llvm/Object/ObjectFile.h
> > +++ include/llvm/Object/ObjectFile.h
> > @@ -293,9 +293,6 @@
> > return std::error_code();
> > }
> >
> > - /// Maps a debug section name to a standard DWARF section name.
> > - virtual StringRef mapDebugSectionName(StringRef Name) const { return
> Name; }
> > -
> > /// True if this is a relocatable object (.o/.obj).
> > virtual bool isRelocatableObject() const = 0;
> >
> > Index: include/llvm/Object/MachO.h
> > ===================================================================
> > --- include/llvm/Object/MachO.h
> > +++ include/llvm/Object/MachO.h
> > @@ -556,8 +556,6 @@
> >
> > bool isRelocatableObject() const override;
> >
> > - StringRef mapDebugSectionName(StringRef Name) const override;
> > -
> > bool hasPageZeroSegment() const { return HasPageZeroSegment; }
> >
> > static bool classof(const Binary *v) {
> >
> >
> > Index: lib/Object/MachOObjectFile.cpp
> > ===================================================================
> > --- lib/Object/MachOObjectFile.cpp
> > +++ lib/Object/MachOObjectFile.cpp
> > @@ -4335,9 +4335,3 @@
> > return make_error<GenericBinaryError>("Unrecognized MachO magic
> number",
> >
> object_error::invalid_file_type);
> > }
> > -
> > -StringRef MachOObjectFile::mapDebugSectionName(StringRef Name) const {
> > - return StringSwitch<StringRef>(Name)
> > - .Case("debug_str_offs", "debug_str_offsets")
> > - .Default(Name);
> > -}
> > Index: lib/DebugInfo/DWARF/DWARFContext.cpp
> > ===================================================================
> > --- lib/DebugInfo/DWARF/DWARFContext.cpp
> > +++ lib/DebugInfo/DWARF/DWARFContext.cpp
> > @@ -978,10 +978,6 @@
> > TypesDWOSections[Section].Data = Data;
> > }
> >
> > - // Map platform specific debug section names to DWARF standard
> section
> > - // names.
> > - Name = Obj.mapDebugSectionName(Name);
> > -
> > if (RelocatedSection == Obj.section_end())
> > continue;
> >
> > Index: include/llvm/Object/ObjectFile.h
> > ===================================================================
> > --- include/llvm/Object/ObjectFile.h
> > +++ include/llvm/Object/ObjectFile.h
> > @@ -293,9 +293,6 @@
> > return std::error_code();
> > }
> >
> > - /// Maps a debug section name to a standard DWARF section name.
> > - virtual StringRef mapDebugSectionName(StringRef Name) const { return
> Name; }
> > -
> > /// True if this is a relocatable object (.o/.obj).
> > virtual bool isRelocatableObject() const = 0;
> >
> > Index: include/llvm/Object/MachO.h
> > ===================================================================
> > --- include/llvm/Object/MachO.h
> > +++ include/llvm/Object/MachO.h
> > @@ -556,8 +556,6 @@
> >
> > bool isRelocatableObject() const override;
> >
> > - StringRef mapDebugSectionName(StringRef Name) const override;
> > -
> > bool hasPageZeroSegment() const { return HasPageZeroSegment; }
> >
> > static bool classof(const Binary *v) {
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170710/21366122/attachment.html>
More information about the llvm-commits
mailing list