diff options
| author | Kazu Hirata <kazu@google.com> | 2025-01-11 13:16:43 -0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2025-01-11 13:16:43 -0800 |
| commit | 4f4e2abb1a5ff1225d32410fd02b732d077aa056 (patch) | |
| tree | 8c9893f3695183f0bce412278c1a93764dec5aa7 /mlir/lib/Bytecode | |
| parent | a56eb7c9986456ae4b492fff79c3cf18d0ef8ad3 (diff) | |
[mlir] Migrate away from PointerUnion::{is,get} (NFC) (#122591)
Note that PointerUnion::{is,get} have been soft deprecated in
PointerUnion.h:
// FIXME: Replace the uses of is(), get() and dyn_cast() with
// isa<T>, cast<T> and the llvm::dyn_cast<T>
I'm not touching PointerUnion::dyn_cast for now because it's a bit
complicated; we could blindly migrate it to dyn_cast_if_present, but
we should probably use dyn_cast when the operand is known to be
non-null.
Diffstat (limited to 'mlir/lib/Bytecode')
| -rw-r--r-- | mlir/lib/Bytecode/Writer/IRNumbering.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mlir/lib/Bytecode/Writer/IRNumbering.h b/mlir/lib/Bytecode/Writer/IRNumbering.h index eab75f50d2ee..9b7ac0d3688e 100644 --- a/mlir/lib/Bytecode/Writer/IRNumbering.h +++ b/mlir/lib/Bytecode/Writer/IRNumbering.h @@ -50,11 +50,11 @@ struct AttrTypeNumbering { }; struct AttributeNumbering : public AttrTypeNumbering { AttributeNumbering(Attribute value) : AttrTypeNumbering(value) {} - Attribute getValue() const { return value.get<Attribute>(); } + Attribute getValue() const { return cast<Attribute>(value); } }; struct TypeNumbering : public AttrTypeNumbering { TypeNumbering(Type value) : AttrTypeNumbering(value) {} - Type getValue() const { return value.get<Type>(); } + Type getValue() const { return cast<Type>(value); } }; //===----------------------------------------------------------------------===// |
