From 4f4e2abb1a5ff1225d32410fd02b732d077aa056 Mon Sep 17 00:00:00 2001 From: Kazu Hirata Date: Sat, 11 Jan 2025 13:16:43 -0800 Subject: [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, cast and the llvm::dyn_cast 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. --- mlir/lib/Bytecode/Writer/IRNumbering.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mlir/lib/Bytecode') 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 getValue() const { return cast(value); } }; struct TypeNumbering : public AttrTypeNumbering { TypeNumbering(Type value) : AttrTypeNumbering(value) {} - Type getValue() const { return value.get(); } + Type getValue() const { return cast(value); } }; //===----------------------------------------------------------------------===// -- cgit v1.2.3