File tree 4 files changed +21
-4
lines changed
4 files changed +21
-4
lines changed Original file line number Diff line number Diff line change @@ -50,14 +50,19 @@ class Attribute {
50
50
// / Casting utility functions. These are deprecated and will be removed,
51
51
// / please prefer using the `llvm` namespace variants instead.
52
52
template <typename ... Tys>
53
+ [[deprecated(" Use isa<U>() instead" )]]
53
54
bool isa () const ;
54
55
template <typename ... Tys>
56
+ [[deprecated(" Use isa_and_nonnull<U>() instead" )]]
55
57
bool isa_and_nonnull () const ;
56
58
template <typename U>
59
+ [[deprecated(" Use dyn_cast<U>() instead" )]]
57
60
U dyn_cast () const ;
58
61
template <typename U>
62
+ [[deprecated(" Use dyn_cast_or_null<U>() instead" )]]
59
63
U dyn_cast_or_null () const ;
60
64
template <typename U>
65
+ [[deprecated(" Use cast<U>() instead" )]]
61
66
U cast () const ;
62
67
63
68
// / Return a unique identifier for the concrete attribute type. This is used
@@ -172,7 +177,7 @@ bool Attribute::isa() const {
172
177
173
178
template <typename ... Tys>
174
179
bool Attribute::isa_and_nonnull () const {
175
- return llvm::isa_and_present <Tys...>(*this );
180
+ return llvm::isa_and_nonnull <Tys...>(*this );
176
181
}
177
182
178
183
template <typename U>
@@ -182,7 +187,7 @@ U Attribute::dyn_cast() const {
182
187
183
188
template <typename U>
184
189
U Attribute::dyn_cast_or_null () const {
185
- return llvm::dyn_cast_if_present <U>(*this );
190
+ return llvm::dyn_cast_or_null <U>(*this );
186
191
}
187
192
188
193
template <typename U>
Original file line number Diff line number Diff line change @@ -78,14 +78,17 @@ class Location {
78
78
79
79
// / Type casting utilities on the underlying location.
80
80
template <typename U>
81
+ [[deprecated(" Use isa<U>() instead" )]]
81
82
bool isa () const {
82
83
return llvm::isa<U>(*this );
83
84
}
84
85
template <typename U>
86
+ [[deprecated(" Use dyn_cast<U>() instead" )]]
85
87
U dyn_cast () const {
86
88
return llvm::dyn_cast<U>(*this );
87
89
}
88
90
template <typename U>
91
+ [[deprecated(" Use cast<U>() instead" )]]
89
92
U cast () const {
90
93
return llvm::cast<U>(*this );
91
94
}
Original file line number Diff line number Diff line change @@ -97,14 +97,19 @@ class Type {
97
97
bool operator !() const { return impl == nullptr ; }
98
98
99
99
template <typename ... Tys>
100
+ [[deprecated(" Use isa<U>() instead" )]]
100
101
bool isa () const ;
101
102
template <typename ... Tys>
103
+ [[deprecated(" Use isa_and_nonnull<U>() instead" )]]
102
104
bool isa_and_nonnull () const ;
103
105
template <typename U>
106
+ [[deprecated(" Use dyn_cast<U>() instead" )]]
104
107
U dyn_cast () const ;
105
108
template <typename U>
109
+ [[deprecated(" Use dyn_cast_or_null<U>() instead" )]]
106
110
U dyn_cast_or_null () const ;
107
111
template <typename U>
112
+ [[deprecated(" Use cast<U>() instead" )]]
108
113
U cast () const ;
109
114
110
115
// / Return a unique identifier for the concrete type. This is used to support
@@ -323,7 +328,7 @@ bool Type::isa() const {
323
328
324
329
template <typename ... Tys>
325
330
bool Type::isa_and_nonnull () const {
326
- return llvm::isa_and_present <Tys...>(*this );
331
+ return llvm::isa_and_nonnull <Tys...>(*this );
327
332
}
328
333
329
334
template <typename U>
Original file line number Diff line number Diff line change @@ -98,21 +98,25 @@ class Value {
98
98
constexpr Value (detail::ValueImpl *impl = nullptr ) : impl(impl) {}
99
99
100
100
template <typename U>
101
+ [[deprecated(" Use isa<U>() instead" )]]
101
102
bool isa () const {
102
103
return llvm::isa<U>(*this );
103
104
}
104
105
105
106
template <typename U>
107
+ [[deprecated(" Use dyn_cast<U>() instead" )]]
106
108
U dyn_cast () const {
107
109
return llvm::dyn_cast<U>(*this );
108
110
}
109
111
110
112
template <typename U>
113
+ [[deprecated(" Use dyn_cast_or_null<U>() instead" )]]
111
114
U dyn_cast_or_null () const {
112
- return llvm::dyn_cast_if_present <U>(*this );
115
+ return llvm::dyn_cast_or_null <U>(*this );
113
116
}
114
117
115
118
template <typename U>
119
+ [[deprecated(" Use cast<U>() instead" )]]
116
120
U cast () const {
117
121
return llvm::cast<U>(*this );
118
122
}
You can’t perform that action at this time.
0 commit comments