Changeset View
Changeset View
Standalone View
Standalone View
include/llvm/IR/DebugInfoMetadata.h
Show First 20 Lines • Show All 2,504 Lines • ▼ Show 20 Lines | public: | ||||
/// Retrieve the details of this fragment expression. | /// Retrieve the details of this fragment expression. | ||||
Optional<FragmentInfo> getFragmentInfo() const { | Optional<FragmentInfo> getFragmentInfo() const { | ||||
return getFragmentInfo(expr_op_begin(), expr_op_end()); | return getFragmentInfo(expr_op_begin(), expr_op_end()); | ||||
} | } | ||||
/// Return whether this is a piece of an aggregate variable. | /// Return whether this is a piece of an aggregate variable. | ||||
bool isFragment() const { return getFragmentInfo().hasValue(); } | bool isFragment() const { return getFragmentInfo().hasValue(); } | ||||
/// Return whether this is an implicit location description. | |||||
bool isImplicit() const; | |||||
aprantl: Thanks! I think the function is too long for an inline definition now, so let's move it into… | |||||
/// Append \p Ops with operations to apply the \p Offset. | /// Append \p Ops with operations to apply the \p Offset. | ||||
Not Done ReplyInline ActionsWouldn't it be much faster to only check the last 2 operands? If it is a stack_value, we're good, if it is a DW_OP_LLVM_fragment, we need to check the one before it. aprantl: Wouldn't it be much faster to only check the last 2 operands? If it is a stack_value, we're… | |||||
static void appendOffset(SmallVectorImpl<uint64_t> &Ops, int64_t Offset); | static void appendOffset(SmallVectorImpl<uint64_t> &Ops, int64_t Offset); | ||||
/// If this is a constant offset, extract it. If there is no expression, | /// If this is a constant offset, extract it. If there is no expression, | ||||
Not Done ReplyInline Actionsthe else is redundant Is this better? I'm not actually sure... if (N == 0) return false; switch (getElement(N-1)) { case dwarf::DW_OP_stack_value: return true; case dwarf::DW_OP_LLVM_fragment: return N > 1 && getElement(N-2) == dwarf::DW_OP_stack_value; default: return true; } aprantl: the `else` is redundant
Is this better? I'm not actually sure...
```
if (N == 0)
return… | |||||
/// return true with an offset of zero. | /// return true with an offset of zero. | ||||
bool extractIfOffset(int64_t &Offset) const; | bool extractIfOffset(int64_t &Offset) const; | ||||
/// Checks if the last 4 elements of the expression are DW_OP_constu <DWARF | /// Checks if the last 4 elements of the expression are DW_OP_constu <DWARF | ||||
/// Address Space> DW_OP_swap DW_OP_xderef and extracts the <DWARF Address | /// Address Space> DW_OP_swap DW_OP_xderef and extracts the <DWARF Address | ||||
/// Space>. | /// Space>. | ||||
static const DIExpression *extractAddressClass(const DIExpression *Expr, | static const DIExpression *extractAddressClass(const DIExpression *Expr, | ||||
unsigned &AddrClass); | unsigned &AddrClass); | ||||
▲ Show 20 Lines • Show All 719 Lines • Show Last 20 Lines |
Thanks! I think the function is too long for an inline definition now, so let's move it into the .cpp file.