1
0
mirror of https://github.com/RPCS3/llvm-mirror.git synced 2024-11-26 12:43:36 +01:00

[DWARF] Add EmitDwarfOffset function, NFC.

Added EmitDwarfOffset function after discussion with Eric Christofer.

llvm-svn: 328212
This commit is contained in:
Alexey Bataev 2018-03-22 16:43:21 +00:00
parent 72a552dcd4
commit c65ff81b00
2 changed files with 7 additions and 0 deletions

View File

@ -475,6 +475,9 @@ public:
EmitLabelPlusOffset(Label, 0, Size, IsSectionRelative);
}
/// Emit something like ".long Label + Offset".
void EmitDwarfOffset(const MCSymbol *Label, uint64_t Offset) const;
//===------------------------------------------------------------------===//
// Dwarf Emission Helper Routines
//===------------------------------------------------------------------===//

View File

@ -179,6 +179,10 @@ void AsmPrinter::emitDwarfStringOffset(DwarfStringPoolEntry S) const {
EmitInt32(S.Offset);
}
void AsmPrinter::EmitDwarfOffset(const MCSymbol *Label, uint64_t Offset) const {
EmitLabelPlusOffset(Label, Offset, MAI->getCodePointerSize());
}
//===----------------------------------------------------------------------===//
// Dwarf Lowering Routines
//===----------------------------------------------------------------------===//