Remove AsmPrinter::needsRelocationsForDwarfStringPool() since it's

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
This commit is contained in:
Eric Christopher 2013-12-28 01:39:17 +00:00
parent ba6102bd8a
commit 3955d28887
3 changed files with 3 additions and 11 deletions

View 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

View 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();

View 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();