[llvm] 1b12ad1 - [IR] Correct Value::use_iterator::value_type. (#120609)
via llvm-commits
llvm-commits at lists.llvm.org
Fri Dec 20 11:25:51 PST 2024
Author: Craig Topper
Date: 2024-12-20T11:25:48-08:00
New Revision: 1b12ad124ec9eb83ca7d1511b12e1dc3e1c5e06a
URL: https://github.com/llvm/llvm-project/commit/1b12ad124ec9eb83ca7d1511b12e1dc3e1c5e06a
DIFF: https://github.com/llvm/llvm-project/commit/1b12ad124ec9eb83ca7d1511b12e1dc3e1c5e06a.diff
LOG: [IR] Correct Value::use_iterator::value_type. (#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.
Added:
Modified:
llvm/include/llvm/IR/Value.h
Removed:
################################################################################
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
diff erence_type = std::ptr
diff _t;
using pointer = value_type *;
using reference = value_type &;
More information about the llvm-commits
mailing list