[llvm] [NFC] Add DIExpression::extractLeadingOffset (PR #97719)
Orlando Cazalet-Hyams via llvm-commits
llvm-commits at lists.llvm.org
Thu Jul 4 07:33:21 PDT 2024
================
@@ -2982,6 +2982,16 @@ class DIExpression : public MDNode {
/// return true with an offset of zero.
bool extractIfOffset(int64_t &Offset) const;
+ /// Assuming that the expression operates on an address, extract a constant
+ /// offset and the succsessive ops. Return false if the expression contains
+ /// any incompatible ops (including non-zero DW_OP_LLVM_args - only a single
+ /// address operand to the expression is permitted).
+ ///
+ /// We don't try very hard to interpret the expression because we assume that
+ /// foldConstantMath has canonicalized the expression.
+ bool extractLeadingOffset(int64_t &Offset,
+ SmallVectorImpl<uint64_t> &RemainingOps) const;
+
----------------
OCHyams wrote:
note to self: rename `Offset` to `OffsetInBytes`
https://github.com/llvm/llvm-project/pull/97719
More information about the llvm-commits
mailing list