diff options
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h index 00734fd6843..203990dd3c9 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h @@ -16,7 +16,6 @@ #include "llvm/IR/DebugInfo.h" #include "llvm/Support/DataTypes.h" -#include "llvm/MC/MachineLocation.h" namespace llvm { @@ -113,8 +112,6 @@ protected: SubRegisterOffsetInBits = OffsetInBits; } - void setMemoryLocationKind(); - /// Add masking operations to stencil out a subregister. void maskSubRegister(); @@ -192,17 +189,24 @@ public: /// Emit an unsigned constant. void addUnsignedConstant(const APInt &Value); + /// Lock this down to become a memory location description. + void setMemoryLocationKind() { + assert(LocationKind == Unknown); + LocationKind = Memory; + } + /// Emit a machine register location. As an optimization this may also consume /// the prefix of a DwarfExpression if a more efficient representation for /// combining the register location and the first operation exists. /// - /// \param FragmentOffsetInBits If this is one fragment out of a fragmented + /// \param FragmentOffsetInBits If this is one fragment out of a + /// fragmented /// location, this is the offset of the /// fragment inside the entire variable. /// \return false if no DWARF register exists /// for MachineReg. - bool addMachineLocExpression(const TargetRegisterInfo &TRI, - DIExpressionCursor &Expr, MachineLocation Loc, + bool addMachineRegExpression(const TargetRegisterInfo &TRI, + DIExpressionCursor &Expr, unsigned MachineReg, unsigned FragmentOffsetInBits = 0); /// Emit all remaining operations in the DIExpressionCursor. /// |