summaryrefslogtreecommitdiffstats
path: root/llvm/lib/CodeGen
diff options
context:
space:
mode:
authorAdrian Prantl <aprantl@apple.com>2015-01-14 01:01:22 +0000
committerAdrian Prantl <aprantl@apple.com>2015-01-14 01:01:22 +0000
commit658676c3eaa769423bde7760f9f43b291e315a56 (patch)
tree73ff878ba6c726249725f9244201e3cf2d336e07 /llvm/lib/CodeGen
parent077affdbb9c4b59f4657987d9a91dcc8427984df (diff)
downloadbcm5719-llvm-658676c3eaa769423bde7760f9f43b291e315a56.tar.gz
bcm5719-llvm-658676c3eaa769423bde7760f9f43b291e315a56.zip
Debug Info: Move DIEDwarfExpression into DwarfExpression.h because it
needs to be accessed from both DwarfCompileUnit.cpp and DwarfUnit.cpp. NFC. llvm-svn: 225898
Diffstat (limited to 'llvm/lib/CodeGen')
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h17
-rw-r--r--llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp14
2 files changed, 17 insertions, 14 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h
index f164f1c8513..4df958c5a03 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h
@@ -22,6 +22,8 @@ namespace llvm {
class AsmPrinter;
class ByteStreamer;
class TargetRegisterInfo;
+class DwarfUnit;
+class DIELoc;
/// Base class containing the logic for constructing DWARF expressions
/// independently of whether they are emitted into a DIE or into a .debug_loc
@@ -108,6 +110,21 @@ public:
void EmitUnsigned(unsigned Value) override;
bool isFrameRegister(unsigned MachineReg) override;
};
+
+/// DwarfExpression implementation for singular DW_AT_location.
+class DIEDwarfExpression : public DwarfExpression {
+ DwarfUnit &DU;
+ DIELoc &DIE;
+
+public:
+ DIEDwarfExpression(const AsmPrinter &AP, DwarfUnit &DU, DIELoc &DIE)
+ : DwarfExpression(AP), DU(DU), DIE(DIE) {}
+
+ void EmitOp(uint8_t Op, const char *Comment = nullptr) override;
+ void EmitSigned(int Value) override;
+ void EmitUnsigned(unsigned Value) override;
+ bool isFrameRegister(unsigned MachineReg) override;
+};
}
#endif
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
index 7b32831c77f..2f2d9c6b54e 100644
--- a/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
+++ b/llvm/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
@@ -44,20 +44,6 @@ GenerateDwarfTypeUnits("generate-type-units", cl::Hidden,
cl::desc("Generate DWARF4 type units."),
cl::init(false));
-/// DwarfExpression implementation for DwarfUnit.
-class DIEDwarfExpression : public DwarfExpression {
- DwarfUnit &DU;
- DIELoc &DIE;
-public:
- DIEDwarfExpression(const AsmPrinter &AP, DwarfUnit &DU, DIELoc &DIE)
- : DwarfExpression(AP), DU(DU), DIE(DIE) {}
-
- void EmitOp(uint8_t Op, const char* Comment = nullptr) override;
- void EmitSigned(int Value) override;
- void EmitUnsigned(unsigned Value) override;
- bool isFrameRegister(unsigned MachineReg) override;
-};
-
void DIEDwarfExpression::EmitOp(uint8_t Op, const char* Comment) {
DU.addUInt(DIE, dwarf::DW_FORM_data1, Op);
}
OpenPOWER on IntegriCloud