summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2015-01-13 00:04:06 +0000
committerAdrian Prantl <aprantl@apple.com>2015-01-13 00:04:06 +0000
commit66f25958450064bece4428cc9aa49cdcc42f46dc (patch)
tree7a4445b4f5e7f7853499287ae6d69417e194ec5f /llvm/lib/CodeGen/AsmPrinter/AsmPrinterDwarf.cpp
parent1777c12206805b032aa448b44eec9a3d635124a1 (diff)
downloadbcm5719-llvm-66f25958450064bece4428cc9aa49cdcc42f46dc.tar.gz
bcm5719-llvm-66f25958450064bece4428cc9aa49cdcc42f46dc.zip
Debug Info: Move support for constants into DwarfExpression.
Move the declaration of DebugLocDwarfExpression into DwarfExpression.h because it needs to be accessed from AsmPrinterDwarf.cpp and DwarfDebug.cpp NFC. llvm-svn: 225734
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