[llvm] [IR] Update docstring for stripAndAccumulateConstantOffset (PR #180365)
Nikita Popov via llvm-commits
llvm-commits at lists.llvm.org
Sat Feb 7 11:25:21 PST 2026
================
@@ -733,8 +733,8 @@ class Value {
/// Note that this function will never return a nullptr. It will also never
/// manipulate the \p Offset in a way that would not match the difference
/// between the underlying value and the returned one. Thus, if no constant
- /// offset was found, the returned value is the underlying one and \p Offset
- /// is unchanged.
+ /// offset was found, \p Offset is unchanged and the returned value is the
+ /// first traversed value to introduce a non-constant offset.
----------------
nikic wrote:
Offset is only unchanged if *no* constant offsets are stripped at all. That matches the start of the sentence but not the end.
https://github.com/llvm/llvm-project/pull/180365
More information about the llvm-commits
mailing list