[llvm] r225898 - Debug Info: Move DIEDwarfExpression into DwarfExpression.h because it
Adrian Prantl
aprantl at apple.com
Tue Jan 13 17:01:22 PST 2015
Author: adrian
Date: Tue Jan 13 19:01:22 2015
New Revision: 225898
URL: http://llvm.org/viewvc/llvm-project?rev=225898&view=rev
Log:
Debug Info: Move DIEDwarfExpression into DwarfExpression.h because it
needs to be accessed from both DwarfCompileUnit.cpp and DwarfUnit.cpp.
NFC.
Modified:
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfExpression.h
llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfExpression.h
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfExpression.h?rev=225898&r1=225897&r2=225898&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfExpression.h (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfExpression.h Tue Jan 13 19:01:22 2015
@@ -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
@@ -105,6 +107,21 @@ public:
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;
+};
+
+/// DwarfExpression implementation for singular DW_AT_location.
+class DIEDwarfExpression : public DwarfExpression {
+ DwarfUnit &DU;
+ DIELoc ¨
+
+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;
};
Modified: llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp?rev=225898&r1=225897&r2=225898&view=diff
==============================================================================
--- llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp (original)
+++ llvm/trunk/lib/CodeGen/AsmPrinter/DwarfUnit.cpp Tue Jan 13 19:01:22 2015
@@ -44,20 +44,6 @@ GenerateDwarfTypeUnits("generate-type-un
cl::desc("Generate DWARF4 type units."),
cl::init(false));
-/// DwarfExpression implementation for DwarfUnit.
-class DIEDwarfExpression : public DwarfExpression {
- DwarfUnit &DU;
- DIELoc ¨
-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);
}
More information about the llvm-commits
mailing list