diff options
Diffstat (limited to 'llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h')
-rw-r--r-- | llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h index 3a9347a3e0a..ec2ef6e575f 100644 --- a/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h +++ b/llvm/lib/CodeGen/AsmPrinter/DwarfExpression.h @@ -119,6 +119,9 @@ protected: /// The kind of location description being produced. enum { Unknown = 0, Register, Memory, Implicit }; + /// The flags of location description being produced. + enum { EntryValue = 1 }; + unsigned LocationKind : 3; unsigned LocationFlags : 2; unsigned DwarfVersion : 4; @@ -140,6 +143,10 @@ public: return LocationKind == Implicit; } + bool isEntryValue() const { + return LocationFlags & EntryValue; + } + Optional<uint8_t> TagOffset; protected: @@ -252,6 +259,11 @@ public: LocationKind = Memory; } + /// Lock this down to become an entry value location. + void setEntryValueFlag() { + LocationFlags |= EntryValue; + } + /// 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. @@ -266,6 +278,9 @@ public: DIExpressionCursor &Expr, unsigned MachineReg, unsigned FragmentOffsetInBits = 0); + /// Emit entry value dwarf operation. + void addEntryValueExpression(DIExpressionCursor &ExprCursor); + /// Emit all remaining operations in the DIExpressionCursor. /// /// \param FragmentOffsetInBits If this is one fragment out of multiple |