[llvm] abb6271 - [ADT] Deprecate Any::hasValue
Kazu Hirata via llvm-commits
llvm-commits at lists.llvm.org
Sat Aug 20 09:34:48 PDT 2022
Author: Kazu Hirata
Date: 2022-08-20T09:34:35-07:00
New Revision: abb6271d809b37d3c3318894d697d5820032bec8
URL: https://github.com/llvm/llvm-project/commit/abb6271d809b37d3c3318894d697d5820032bec8
DIFF: https://github.com/llvm/llvm-project/commit/abb6271d809b37d3c3318894d697d5820032bec8.diff
LOG: [ADT] Deprecate Any::hasValue
This patch deprecates Any::hasValue as I've migrated all known uses of
it to Any::has_value. I'm planning to remove the deprecated method in
3 months or so.
Differential Revision: https://reviews.llvm.org/D132304
Added:
Modified:
llvm/include/llvm/ADT/Any.h
Removed:
################################################################################
diff --git a/llvm/include/llvm/ADT/Any.h b/llvm/include/llvm/ADT/Any.h
index 457b40bae200..777db31fb2ef 100644
--- a/llvm/include/llvm/ADT/Any.h
+++ b/llvm/include/llvm/ADT/Any.h
@@ -100,6 +100,7 @@ class LLVM_EXTERNAL_VISIBILITY Any {
return *this;
}
+ LLVM_DEPRECATED("Use has_value instead.", "has_value")
bool hasValue() const { return !!Storage; }
bool has_value() const { return !!Storage; }
More information about the llvm-commits
mailing list