[llvm] [IR] Correct Value::use_iterator::value_type. (PR #120609)
via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 19 09:28:43 PST 2024
llvmbot wrote:
<!--LLVM PR SUMMARY COMMENT-->
@llvm/pr-subscribers-llvm-ir
Author: Craig Topper (topperc)
<details>
<summary>Changes</summary>
operator* for this iterator returns Use& so I think the value_type should be Use not Use*.
Noticed while comparing with SDNode::use_iterator.
---
Full diff: https://github.com/llvm/llvm-project/pull/120609.diff
1 Files Affected:
- (modified) llvm/include/llvm/IR/Value.h (+1-1)
``````````diff
diff --git a/llvm/include/llvm/IR/Value.h b/llvm/include/llvm/IR/Value.h
index d444a768a65436..011aedece94ab7 100644
--- a/llvm/include/llvm/IR/Value.h
+++ b/llvm/include/llvm/IR/Value.h
@@ -131,7 +131,7 @@ class Value {
public:
using iterator_category = std::forward_iterator_tag;
- using value_type = UseT *;
+ using value_type = UseT;
using difference_type = std::ptrdiff_t;
using pointer = value_type *;
using reference = value_type &;
``````````
</details>
https://github.com/llvm/llvm-project/pull/120609
More information about the llvm-commits
mailing list