mirror of
https://github.com/intel/llvm.git
synced 2026-01-25 10:55:58 +08:00
[mlir] Added support for Index type inside getZeroAttr function
Differential Revision: https://reviews.llvm.org/D85833
This commit is contained in:
@@ -274,6 +274,8 @@ Attribute Builder::getZeroAttr(Type type) {
|
||||
case StandardTypes::F32:
|
||||
case StandardTypes::F64:
|
||||
return getFloatAttr(type, 0.0);
|
||||
case StandardTypes::Index:
|
||||
return getIndexAttr(0);
|
||||
case StandardTypes::Integer:
|
||||
return getIntegerAttr(type, APInt(type.cast<IntegerType>().getWidth(), 0));
|
||||
case StandardTypes::Vector:
|
||||
|
||||
Reference in New Issue
Block a user