diff options
| author | Chris Lattner <sabre@nondot.org> | 2010-04-04 20:20:50 +0000 |
|---|---|---|
| committer | Chris Lattner <sabre@nondot.org> | 2010-04-04 20:20:50 +0000 |
| commit | e619c0d3e9022c92c738e7208653dfacc3034b24 (patch) | |
| tree | 79b808a34dff37999ab4365e068978752756c7ed /llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp | |
| parent | 07c1b94faa18a955d7bf9783cdbec0b840e226d9 (diff) | |
| download | bcm5719-llvm-e619c0d3e9022c92c738e7208653dfacc3034b24.tar.gz bcm5719-llvm-e619c0d3e9022c92c738e7208653dfacc3034b24.zip | |
move some more stuff to asmprinter.
llvm-svn: 100351
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp')
| -rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp index 10f302647bd..87224fa6682 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfPrinter.cpp @@ -37,37 +37,6 @@ DwarfPrinter::DwarfPrinter(AsmPrinter *A) RI(Asm->TM.getRegisterInfo()), M(NULL), MF(NULL), MMI(NULL), SubprogramCount(0) {} -/// SizeOfEncodedValue - Return the size of the encoding in bytes. -unsigned DwarfPrinter::SizeOfEncodedValue(unsigned Encoding) const { - if (Encoding == dwarf::DW_EH_PE_omit) - return 0; - - switch (Encoding & 0x07) { - default: assert(0 && "Invalid encoded value."); - case dwarf::DW_EH_PE_absptr: return TD->getPointerSize(); - case dwarf::DW_EH_PE_udata2: return 2; - case dwarf::DW_EH_PE_udata4: return 4; - case dwarf::DW_EH_PE_udata8: return 8; - } -} - -void DwarfPrinter::EmitReference(const MCSymbol *Sym, unsigned Encoding) const { - const TargetLoweringObjectFile &TLOF = Asm->getObjFileLowering(); - - const MCExpr *Exp = TLOF.getExprForDwarfReference(Sym, Asm->Mang, - Asm->MMI, Encoding, - Asm->OutStreamer); - Asm->OutStreamer.EmitValue(Exp, SizeOfEncodedValue(Encoding), /*addrspace*/0); -} - -void DwarfPrinter::EmitReference(const GlobalValue *GV, unsigned Encoding)const{ - const TargetLoweringObjectFile &TLOF = Asm->getObjFileLowering(); - - const MCExpr *Exp = - TLOF.getExprForDwarfGlobalReference(GV, Asm->Mang, Asm->MMI, Encoding, - Asm->OutStreamer); - Asm->OutStreamer.EmitValue(Exp, SizeOfEncodedValue(Encoding), /*addrspace*/0); -} void DwarfPrinter::EmitSectionOffset(const MCSymbol *Label, const MCSymbol *Section, |

