OSDN Git Service

Remove AsmPrinter::needsRelocationsForDwarfStringPool() since it's
authorEric Christopher <echristo@gmail.com>
Sat, 28 Dec 2013 01:39:17 +0000 (01:39 +0000)
committerEric Christopher <echristo@gmail.com>
Sat, 28 Dec 2013 01:39:17 +0000 (01:39 +0000)
just calling into MAI and is only abstracting for a single interface that
we actually need to check in multiple places.

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

include/llvm/CodeGen/AsmPrinter.h
lib/CodeGen/AsmPrinter/AsmPrinter.cpp
lib/CodeGen/AsmPrinter/DwarfUnit.cpp

index 24e2145..c22d1ea 100644 (file)
@@ -209,11 +209,6 @@ namespace llvm {
 
     bool needsSEHMoves();
 
-    /// needsRelocationsForDwarfStringPool - Specifies whether the object format
-    /// expects to use relocations to refer to debug entries. Alternatively we
-    /// emit section offsets in bytes from the start of the string pool.
-    bool needsRelocationsForDwarfStringPool() const;
-
     /// EmitConstantPool - Print to the current output stream assembly
     /// representations of the constants in the constant pool MCP. This is
     /// used to print out constants which have been "spilled to memory" by
index f704f7a..5fb79c7 100644 (file)
@@ -661,10 +661,6 @@ bool AsmPrinter::needsSEHMoves() {
     MF->getFunction()->needsUnwindTableEntry();
 }
 
-bool AsmPrinter::needsRelocationsForDwarfStringPool() const {
-  return MAI->doesDwarfUseRelocationsAcrossSections();
-}
-
 void AsmPrinter::emitPrologLabel(const MachineInstr &MI) {
   const MCSymbol *Label = MI.getOperand(0).getMCSymbol();
 
index df31099..693e37f 100644 (file)
@@ -22,6 +22,7 @@
 #include "llvm/IR/DataLayout.h"
 #include "llvm/IR/GlobalVariable.h"
 #include "llvm/IR/Instructions.h"
+#include "llvm/MC/MCAsmInfo.h"
 #include "llvm/MC/MCSection.h"
 #include "llvm/MC/MCStreamer.h"
 #include "llvm/Target/Mangler.h"
@@ -198,7 +199,7 @@ void DwarfUnit::addString(DIE *Die, dwarf::Attribute Attribute,
   dwarf::Form Form;
   if (!DD->useSplitDwarf()) {
     MCSymbol *Symb = DU->getStringPoolEntry(String);
-    if (Asm->needsRelocationsForDwarfStringPool())
+    if (Asm->MAI->doesDwarfUseRelocationsAcrossSections())
       Value = new (DIEValueAllocator) DIELabel(Symb);
     else {
       MCSymbol *StringPool = DU->getStringPoolSym();
@@ -220,7 +221,7 @@ void DwarfUnit::addLocalString(DIE *Die, dwarf::Attribute Attribute,
                                StringRef String) {
   MCSymbol *Symb = DU->getStringPoolEntry(String);
   DIEValue *Value;
-  if (Asm->needsRelocationsForDwarfStringPool())
+  if (Asm->MAI->doesDwarfUseRelocationsAcrossSections())
     Value = new (DIEValueAllocator) DIELabel(Symb);
   else {
     MCSymbol *StringPool = DU->getStringPoolSym();