[PATCH] [ARM] Remove isThumb() as it's not used and it's not in the right place.
Rui Ueyama
ruiu at google.com
Tue Jun 11 15:51:48 PDT 2013
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>(
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D959.1.patch
Type: text/x-patch
Size: 4312 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130611/113ff561/attachment.bin>
More information about the llvm-commits
mailing list