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

Nick Kledzik kledzik at apple.com
Wed Jun 12 17:40:48 PDT 2013


Rui,

Thumbness is an Atom attribute.  It is in the right place.  Yes, it is architecture specific, but we currently have no other examples of architecture specific atom attributes.  When we do, we'll figure out how to generalize. 

-Nick

On Jun 12, 2013, at 5:26 PM, Rui Ueyama wrote:
> Author: ruiu
> Date: Wed Jun 12 19:26:16 2013
> New Revision: 183877
> 
> URL: http://llvm.org/viewvc/llvm-project?rev=183877&view=rev
> Log:
> [ARM] Remove isThumb() as it's not used and it's not in the right place.
> 
> 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.
> 
> Reviewers: Bigcheese
> 
> CC: llvm-commits
> 
> Differential Revision: http://llvm-reviews.chandlerc.com/D959
> 
> Modified:
>    lld/trunk/include/lld/Core/DefinedAtom.h
>    lld/trunk/include/lld/ReaderWriter/Simple.h
>    lld/trunk/lib/ReaderWriter/CoreTargetInfo.cpp
>    lld/trunk/lib/ReaderWriter/ELF/Atoms.h
>    lld/trunk/lib/ReaderWriter/Native/ReaderNative.cpp
>    lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp
>    lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
>    lld/trunk/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp
> 
> Modified: lld/trunk/include/lld/Core/DefinedAtom.h
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/Core/DefinedAtom.h?rev=183877&r1=183876&r2=183877&view=diff
> ==============================================================================
> --- lld/trunk/include/lld/Core/DefinedAtom.h (original)
> +++ lld/trunk/include/lld/Core/DefinedAtom.h Wed Jun 12 19:26:16 2013
> @@ -253,11 +253,6 @@ public:
>   /// 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
> 
> Modified: lld/trunk/include/lld/ReaderWriter/Simple.h
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/include/lld/ReaderWriter/Simple.h?rev=183877&r1=183876&r2=183877&view=diff
> ==============================================================================
> --- lld/trunk/include/lld/ReaderWriter/Simple.h (original)
> +++ lld/trunk/include/lld/ReaderWriter/Simple.h Wed Jun 12 19:26:16 2013
> @@ -128,8 +128,6 @@ public:
>     return DefinedAtom::deadStripNormal;
>   }
> 
> -  virtual bool isThumb() const { return false; }
> -
>   virtual bool isAlias() const { return false; }
> 
>   virtual DefinedAtom::reference_iterator begin() const {
> 
> Modified: lld/trunk/lib/ReaderWriter/CoreTargetInfo.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/CoreTargetInfo.cpp?rev=183877&r1=183876&r2=183877&view=diff
> ==============================================================================
> --- lld/trunk/lib/ReaderWriter/CoreTargetInfo.cpp (original)
> +++ lld/trunk/lib/ReaderWriter/CoreTargetInfo.cpp Wed Jun 12 19:26:16 2013
> @@ -84,10 +84,6 @@ public:
>     return DefinedAtom::permR_X;
>   }
> 
> -  virtual bool isThumb() const {
> -    return false;
> -  }
> -
>   virtual bool isAlias() const {
>     return false;
>   }
> @@ -180,10 +176,6 @@ public:
>     return DefinedAtom::permRW_;
>   }
> 
> -  virtual bool isThumb() const {
> -    return false;
> -  }
> -
>   virtual bool isAlias() const {
>     return false;
>   }
> 
> Modified: lld/trunk/lib/ReaderWriter/ELF/Atoms.h
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/ELF/Atoms.h?rev=183877&r1=183876&r2=183877&view=diff
> ==============================================================================
> --- lld/trunk/lib/ReaderWriter/ELF/Atoms.h (original)
> +++ lld/trunk/lib/ReaderWriter/ELF/Atoms.h Wed Jun 12 19:26:16 2013
> @@ -439,12 +439,6 @@ public:
>     }
>   }
> 
> -  // 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;
> 
> Modified: lld/trunk/lib/ReaderWriter/Native/ReaderNative.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/Native/ReaderNative.cpp?rev=183877&r1=183876&r2=183877&view=diff
> ==============================================================================
> --- lld/trunk/lib/ReaderWriter/Native/ReaderNative.cpp (original)
> +++ lld/trunk/lib/ReaderWriter/Native/ReaderNative.cpp Wed Jun 12 19:26:16 2013
> @@ -94,10 +94,6 @@ public:
>      return (DefinedAtom::ContentPermissions)(attributes().permissions);
>   }
> 
> -  virtual bool isThumb() const {
> -     return false; //(attributes().thumb != 0);
> -  }
> -
>   virtual bool isAlias() const {
>      return (attributes().alias != 0);
>   }
> 
> Modified: lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp?rev=183877&r1=183876&r2=183877&view=diff
> ==============================================================================
> --- lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp (original)
> +++ lld/trunk/lib/ReaderWriter/Native/WriterNative.cpp Wed Jun 12 19:26:16 2013
> @@ -441,7 +441,6 @@ private:
>                           = atom.sectionChoice() << 4 | atom.sectionPosition();
>     attrs.deadStrip         = atom.deadStrip();
>     attrs.permissions       = atom.permissions();
> -    //attrs.thumb             = atom.isThumb();
>     attrs.alias             = atom.isAlias();
>   }
> 
> 
> Modified: lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp?rev=183877&r1=183876&r2=183877&view=diff
> ==============================================================================
> --- lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp (original)
> +++ lld/trunk/lib/ReaderWriter/PECOFF/ReaderCOFF.cpp Wed Jun 12 19:26:16 2013
> @@ -176,10 +176,6 @@ public:
>     return perm___;
>   }
> 
> -  virtual bool isThumb() const {
> -    return false;
> -  }
> -
>   virtual bool isAlias() const {
>     return false;
>   }
> 
> Modified: lld/trunk/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp
> URL: http://llvm.org/viewvc/llvm-project/lld/trunk/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp?rev=183877&r1=183876&r2=183877&view=diff
> ==============================================================================
> --- lld/trunk/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp (original)
> +++ lld/trunk/lib/ReaderWriter/YAML/ReaderWriterYAML.cpp Wed Jun 12 19:26:16 2013
> @@ -933,7 +933,6 @@ struct MappingTraits<const lld::DefinedA
>     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




More information about the llvm-commits mailing list