Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions llvm/include/llvm/ADT/PointerUnion.h
Original file line number Diff line number Diff line change
Expand Up @@ -147,12 +147,18 @@ class PointerUnion
// isa<T>, cast<T> and the llvm::dyn_cast<T>

/// Test if the Union currently holds the type matching T.
template <typename T> inline bool is() const { return isa<T>(*this); }
template <typename T>
[[deprecated("Use isa instead")]]
inline bool is() const {
return isa<T>(*this);
}

/// Returns the value of the specified pointer type.
///
/// If the specified pointer type is incorrect, assert.
template <typename T> inline T get() const {
template <typename T>
[[deprecated("Use cast instead")]]
inline T get() const {
assert(isa<T>(*this) && "Invalid accessor called");
return cast<T>(*this);
}
Expand Down
Loading