summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp20
1 files changed, 6 insertions, 14 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp b/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
index d3131541eb3..5d6a03080c4 100644
--- a/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
@@ -32,32 +32,24 @@ using namespace llvm;
#define DEBUG_TYPE "asm-printer"
-/// DwarfExpression implementation for .debug_loc entries.
-class DebugLocDwarfExpression : public DwarfExpression {
- ByteStreamer &BS;
-
-public:
- DebugLocDwarfExpression(const AsmPrinter &AP, ByteStreamer &BS)
- : DwarfExpression(AP), BS(BS) {}
-
- void EmitOp(uint8_t Op, const char *Comment) override;
- void EmitSigned(int Value) override;
- void EmitUnsigned(unsigned Value) override;
- unsigned getFrameRegister() override { llvm_unreachable("not available"); };
-};
-
void DebugLocDwarfExpression::EmitOp(uint8_t Op, const char *Comment) {
BS.EmitInt8(
Op, Comment ? Twine(Comment) + " " + dwarf::OperationEncodingString(Op)
: dwarf::OperationEncodingString(Op));
}
+
void DebugLocDwarfExpression::EmitSigned(int Value) {
BS.EmitSLEB128(Value, Twine(Value));
}
+
void DebugLocDwarfExpression::EmitUnsigned(unsigned Value) {
BS.EmitULEB128(Value, Twine(Value));
}
+unsigned DebugLocDwarfExpression::getFrameRegister() {
+ llvm_unreachable("not available");
+}
+
//===----------------------------------------------------------------------===//
// Dwarf Emission Helper Routines
//===----------------------------------------------------------------------===//
OpenPOWER on IntegriCloud