diff options
Diffstat (limited to 'mlir/lib/Rewrite/ByteCode.cpp')
-rw-r--r-- | mlir/lib/Rewrite/ByteCode.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/mlir/lib/Rewrite/ByteCode.cpp b/mlir/lib/Rewrite/ByteCode.cpp index 7125dd3..d4ca8b2 100644 --- a/mlir/lib/Rewrite/ByteCode.cpp +++ b/mlir/lib/Rewrite/ByteCode.cpp @@ -1652,7 +1652,9 @@ void ByteCodeExecutor::executeGetAttributeType() { LLVM_DEBUG(llvm::dbgs() << "Executing GetAttributeType:\n"); unsigned memIndex = read(); Attribute attr = read<Attribute>(); - Type type = attr ? attr.getType() : Type(); + Type type; + if (auto typedAttr = attr.dyn_cast<TypedAttr>()) + type = typedAttr.getType(); LLVM_DEBUG(llvm::dbgs() << " * Attribute: " << attr << "\n" << " * Result: " << type << "\n"); |