[llvm] [IR] Correct Value::use_iterator::value_type. (PR #120609)
Craig Topper via llvm-commits
llvm-commits at lists.llvm.org
Thu Dec 19 09:28:07 PST 2024
https://github.com/topperc created https://github.com/llvm/llvm-project/pull/120609
operator* for this iterator returns Use& so I think the value_type should be Use not Use*.
Noticed while comparing with SDNode::use_iterator.
>From c09ddf7a8271fb089fe820f48e3a2f45cf4f4cda Mon Sep 17 00:00:00 2001
From: Craig Topper <craig.topper at sifive.com>
Date: Thu, 19 Dec 2024 09:25:08 -0800
Subject: [PATCH] [IR] Correct Value::use_iterator::value_type.
operator* for this iterator returns Use& so I think the value_type
should be Use not Use*.
Noticed while comparing with SDNode::use_iterator.
---
llvm/include/llvm/IR/Value.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
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 &;
More information about the llvm-commits
mailing list