[llvm] r198092 - Remove AsmPrinter::needsRelocationsForDwarfStringPool() since it's
Eric Christopher
echristo at gmail.com
Fri Dec 27 17:39:18 PST 2013
Author: echristo
Date: Fri Dec 27 19:39:17 2013
New Revision: 198092
URL: http://llvm.org/viewvc/llvm-project?rev=198092&view=rev
Log:
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.
Modified:
llvm/trunk/include/llvm/CodeGen/AsmPrinter.h
llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
Modified: llvm/trunk/include/llvm/CodeGen/AsmPrinter.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/include/llvm/CodeGen/AsmPrinter.h?rev=198092&r1=198091&r2=198092&view=diff
==============================================================================
--- llvm/trunk/include/llvm/CodeGen/AsmPrinter.h (original)
+++ llvm/trunk/include/llvm/CodeGen/AsmPrinter.h Fri Dec 27 19:39:17 2013
@@ -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
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp?rev=198092&r1=198091&r2=198092&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/AsmPrinter.cpp Fri Dec 27 19:39:17 2013
@@ -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();
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=198092&r1=198091&r2=198092&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp Fri Dec 27 19:39:17 2013
@@ -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, dwar
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,
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();
More information about the llvm-commits
mailing list