MC/Target: Remove HasScatteredSymbols target hook variable, which has been
authorDaniel Dunbar <daniel@zuster.org>
Fri, 17 Dec 2010 02:06:08 +0000 (02:06 +0000)
committerDaniel Dunbar <daniel@zuster.org>
Fri, 17 Dec 2010 02:06:08 +0000 (02:06 +0000)
superceded and was effectively dead.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122024 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Target/TargetAsmBackend.h
lib/MC/MachObjectWriter.cpp
lib/MC/TargetAsmBackend.cpp
lib/Target/ARM/ARMAsmBackend.cpp
lib/Target/MBlaze/MBlazeAsmBackend.cpp
lib/Target/PowerPC/PPCAsmBackend.cpp
lib/Target/X86/X86AsmBackend.cpp

index 7ce6efc6e5592f568a53094ffafbeae9385669e4..50904b135f86eec3bbd5561b4c79f3d04d28928e 100644 (file)
@@ -33,7 +33,6 @@ protected: // Can only create subclasses.
   TargetAsmBackend();
 
   unsigned HasReliableSymbolDifference : 1;
-  unsigned HasScatteredSymbols : 1;
 
 public:
   virtual ~TargetAsmBackend();
@@ -58,16 +57,6 @@ public:
     return HasReliableSymbolDifference;
   }
 
-  /// hasScatteredSymbols - Check whether this target supports scattered
-  /// symbols. If so, the assembler should assume that atoms can be scattered by
-  /// the linker. In particular, this means that the offsets between symbols
-  /// which are in distinct atoms is not known at link time, and the assembler
-  /// must generate fixups and relocations appropriately.
-  ///
-  /// Note that the assembler currently does not reason about atoms, instead it
-  /// assumes all temporary symbols reside in the "current atom".
-  bool hasScatteredSymbols() const { return HasScatteredSymbols; }
-
   /// doesSectionRequireSymbols - Check whether the given section requires that
   /// all symbols (even temporaries) have symbol table entries.
   virtual bool doesSectionRequireSymbols(const MCSection &Section) const {
index b2258027b1ce68338075021e77722d8fd32ac338..619954ca3b02e332eeca3611f224c9528cd727a7 100644 (file)
@@ -1123,15 +1123,10 @@ public:
                        UndefinedSymbolData);
   }
 
-
   bool IsFixupFullyResolved(const MCAssembler &Asm,
                             const MCValue Target,
                             bool IsPCRel,
                             const MCFragment *DF) const {
-    // If we aren't using scattered symbols, the fixup is fully resolved.
-    if (!Asm.getBackend().hasScatteredSymbols())
-      return true;
-
     // Otherwise, determine whether this value is actually resolved; scattering
     // may cause atoms to move.
 
index 156bf19b43699e0b9e2dc469f0d1865148f77373..e0653d05ef031845039a752b260dda13fdaf898c 100644 (file)
@@ -11,8 +11,7 @@
 using namespace llvm;
 
 TargetAsmBackend::TargetAsmBackend()
-  : HasReliableSymbolDifference(false),
-    HasScatteredSymbols(false)
+  : HasReliableSymbolDifference(false)
 {
 }
 
index db7e20cfc01b54d8ca4ebd315b0c251a848c0fee..9916de34652e3edf57147fd67e7362db0d8485a5 100644 (file)
@@ -336,9 +336,7 @@ class ELFARMAsmBackend : public ARMAsmBackend {
 public:
   Triple::OSType OSType;
   ELFARMAsmBackend(const Target &T, Triple::OSType _OSType)
-    : ARMAsmBackend(T), OSType(_OSType) {
-    HasScatteredSymbols = true;
-  }
+    : ARMAsmBackend(T), OSType(_OSType) { }
 
   virtual const MCObjectFormat &getObjectFormat() const {
     return Format;
@@ -376,9 +374,7 @@ void ELFARMAsmBackend::ApplyFixup(const MCFixup &Fixup, char *Data,
 class DarwinARMAsmBackend : public ARMAsmBackend {
   MCMachOObjectFormat Format;
 public:
-  DarwinARMAsmBackend(const Target &T) : ARMAsmBackend(T) {
-    HasScatteredSymbols = true;
-  }
+  DarwinARMAsmBackend(const Target &T) : ARMAsmBackend(T) { }
 
   virtual const MCObjectFormat &getObjectFormat() const {
     return Format;
index 83156f5531f42f95d6dce5e206efc5192102cb8c..d3be2b55aec1d74d0b152ddd4eae63b61d00353e 100644 (file)
@@ -105,9 +105,7 @@ class ELFMBlazeAsmBackend : public MBlazeAsmBackend {
 public:
   Triple::OSType OSType;
   ELFMBlazeAsmBackend(const Target &T, Triple::OSType _OSType)
-    : MBlazeAsmBackend(T), OSType(_OSType) {
-    HasScatteredSymbols = true;
-  }
+    : MBlazeAsmBackend(T), OSType(_OSType) { }
 
   virtual const MCObjectFormat &getObjectFormat() const {
     return Format;
index bf437e3aded7a91e70305284ae57342e9e17404d..9dfc6fce9470b78577803bc3e537dfc41565fd5c 100644 (file)
@@ -84,9 +84,7 @@ namespace {
   class DarwinPPCAsmBackend : public PPCAsmBackend {
     MCMachOObjectFormat Format;
   public:
-    DarwinPPCAsmBackend(const Target &T) : PPCAsmBackend(T) {
-      HasScatteredSymbols = true;
-    }
+    DarwinPPCAsmBackend(const Target &T) : PPCAsmBackend(T) { }
     
     virtual const MCObjectFormat &getObjectFormat() const {
       return Format;
index d137875e2cf60e33a8c520c9417ca6a8bc9005ba..3f58e43ea1523071525e2f8c01224b7731f8c870 100644 (file)
@@ -289,7 +289,6 @@ public:
   Triple::OSType OSType;
   ELFX86AsmBackend(const Target &T, Triple::OSType _OSType)
     : X86AsmBackend(T), OSType(_OSType) {
-    HasScatteredSymbols = true;
     HasReliableSymbolDifference = true;
   }
 
@@ -337,7 +336,6 @@ public:
   WindowsX86AsmBackend(const Target &T, bool is64Bit)
     : X86AsmBackend(T)
     , Is64Bit(is64Bit) {
-    HasScatteredSymbols = true;
   }
 
   virtual const MCObjectFormat &getObjectFormat() const {
@@ -354,9 +352,7 @@ class DarwinX86AsmBackend : public X86AsmBackend {
 
 public:
   DarwinX86AsmBackend(const Target &T)
-    : X86AsmBackend(T) {
-    HasScatteredSymbols = true;
-  }
+    : X86AsmBackend(T) { }
 
   virtual const MCObjectFormat &getObjectFormat() const {
     return Format;