[PATCH] [ARM] Remove isThumb() as it's not used and it's not in the right place.

Renato Golin renato.golin at linaro.org
Tue Jun 11 18:51:33 PDT 2013


Looks more like left over of a bad refactoring than an intentional feature.
I can't see any reason to keep that code...  LGTM.

Cheers,
Renato
On 12 Jun 2013 01:33, "Rui Ueyama" <ruiu at google.com> wrote:

> Hi Bigcheese,
>
> Architecture specific code should reside in architecture specific
> directory,
> not in Atom. Looks like there are no efforts being made at this moment to
> support ARM, so let's remove it for now.
>
> http://llvm-reviews.chandlerc.com/D959
>
> Files:
>   include/lld/Core/DefinedAtom.h
>   include/lld/ReaderWriter/Simple.h
>   lib/ReaderWriter/CoreTargetInfo.cpp
>   lib/ReaderWriter/ELF/Atoms.h
>   lib/ReaderWriter/Native/ReaderNative.cpp
>   lib/ReaderWriter/Native/WriterNative.cpp
>   lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
>   lib/ReaderWriter/YAML/ReaderWriterYAML.cpp
>
> Index: include/lld/Core/DefinedAtom.h
> ===================================================================
> --- include/lld/Core/DefinedAtom.h
> +++ include/lld/Core/DefinedAtom.h
> @@ -253,11 +253,6 @@
>    /// is R__.
>    virtual ContentPermissions permissions() const;
>
> -  /// \brief only applicable to ARM code. Tells the linker if the code
> uses
> -  /// thumb or arm instructions.  The linker needs to know this to set
> the low
> -  /// bit of pointers to thumb functions.
> -  virtual bool isThumb() const = 0;
> -
>    /// \brief means this is a zero size atom that exists to provide an
> alternate
>    /// name for another atom.  Alias atoms must have a special Reference
> to the
>    /// atom they alias which the layout engine recognizes and forces the
> alias
> Index: include/lld/ReaderWriter/Simple.h
> ===================================================================
> --- include/lld/ReaderWriter/Simple.h
> +++ include/lld/ReaderWriter/Simple.h
> @@ -128,8 +128,6 @@
>      return DefinedAtom::deadStripNormal;
>    }
>
> -  virtual bool isThumb() const { return false; }
> -
>    virtual bool isAlias() const { return false; }
>
>    virtual DefinedAtom::reference_iterator begin() const {
> Index: lib/ReaderWriter/CoreTargetInfo.cpp
> ===================================================================
> --- lib/ReaderWriter/CoreTargetInfo.cpp
> +++ lib/ReaderWriter/CoreTargetInfo.cpp
> @@ -84,10 +84,6 @@
>      return DefinedAtom::permR_X;
>    }
>
> -  virtual bool isThumb() const {
> -    return false;
> -  }
> -
>    virtual bool isAlias() const {
>      return false;
>    }
> @@ -180,10 +176,6 @@
>      return DefinedAtom::permRW_;
>    }
>
> -  virtual bool isThumb() const {
> -    return false;
> -  }
> -
>    virtual bool isAlias() const {
>      return false;
>    }
> Index: lib/ReaderWriter/ELF/Atoms.h
> ===================================================================
> --- lib/ReaderWriter/ELF/Atoms.h
> +++ lib/ReaderWriter/ELF/Atoms.h
> @@ -434,12 +434,6 @@
>      }
>    }
>
> -  // Many non ARM architectures use ELF file format This not really a
> place to
> -  // put a architecture specific method in an atom. A better approach is
> needed.
> -  virtual bool isThumb() const {
> -    return false;
> -  }
> -
>    // FIXME: Not Sure if ELF supports alias atoms. Find out more.
>    virtual bool isAlias() const {
>      return false;
> Index: lib/ReaderWriter/Native/ReaderNative.cpp
> ===================================================================
> --- lib/ReaderWriter/Native/ReaderNative.cpp
> +++ lib/ReaderWriter/Native/ReaderNative.cpp
> @@ -94,10 +94,6 @@
>       return (DefinedAtom::ContentPermissions)(attributes().permissions);
>    }
>
> -  virtual bool isThumb() const {
> -     return false; //(attributes().thumb != 0);
> -  }
> -
>    virtual bool isAlias() const {
>       return (attributes().alias != 0);
>    }
> Index: lib/ReaderWriter/Native/WriterNative.cpp
> ===================================================================
> --- lib/ReaderWriter/Native/WriterNative.cpp
> +++ lib/ReaderWriter/Native/WriterNative.cpp
> @@ -441,7 +441,6 @@
>                            = atom.sectionChoice() << 4 |
> atom.sectionPosition();
>      attrs.deadStrip         = atom.deadStrip();
>      attrs.permissions       = atom.permissions();
> -    //attrs.thumb             = atom.isThumb();
>      attrs.alias             = atom.isAlias();
>    }
>
> Index: lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
> ===================================================================
> --- lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
> +++ lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
> @@ -176,10 +176,6 @@
>      return perm___;
>    }
>
> -  virtual bool isThumb() const {
> -    return false;
> -  }
> -
>    virtual bool isAlias() const {
>      return false;
>    }
> Index: lib/ReaderWriter/YAML/ReaderWriterYAML.cpp
> ===================================================================
> --- lib/ReaderWriter/YAML/ReaderWriterYAML.cpp
> +++ lib/ReaderWriter/YAML/ReaderWriterYAML.cpp
> @@ -933,7 +933,6 @@
>      virtual SectionPosition    sectionPosition() const{return
> _sectionPosition;}
>      virtual DeadStripKind      deadStrip() const     { return _deadStrip;
>  }
>      virtual ContentPermissions permissions() const   { return
> _permissions; }
> -    virtual bool               isThumb() const       { return false; }
>      virtual bool               isAlias() const       { return false; }
>      ArrayRef<uint8_t>          rawContent() const    {
>        return ArrayRef<uint8_t>(
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130612/061d58b1/attachment.html>


More information about the llvm-commits mailing list