Skip to content

Commit 98534ee

Browse files
[mlir] Migrate away from PointerUnion::dyn_cast (NFC) (#135770)
Note that PointerUnion::dyn_cast has 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> Literal migration would result in dyn_cast_if_present (see the definition of PointerUnion::dyn_cast), but this patch uses dyn_cast because we have a call to dyn_cast earlier in the function, implying that attrOrProp is nonnull.
1 parent c8121b9 commit 98534ee

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mlir/tools/mlir-tblgen/OpDefinitionsGen.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1828,7 +1828,7 @@ void OpEmitter::genPropertiesSupportForBytecode(
18281828
name, tgfmt(namedProperty->prop.getWriteToMlirBytecodeCall(), &fctx));
18291829
continue;
18301830
}
1831-
const auto *namedAttr = attrOrProp.dyn_cast<const AttributeMetadata *>();
1831+
const auto *namedAttr = dyn_cast<const AttributeMetadata *>(attrOrProp);
18321832
StringRef name = namedAttr->attrName;
18331833
if (namedAttr->isRequired) {
18341834
readPropertiesMethod << formatv(R"(

0 commit comments

Comments
 (0)