diff --git a/mlir/include/mlir/IR/FunctionSupport.h b/mlir/include/mlir/IR/FunctionSupport.h --- a/mlir/include/mlir/IR/FunctionSupport.h +++ b/mlir/include/mlir/IR/FunctionSupport.h @@ -390,7 +390,8 @@ auto argAttrRange = argAttrs.template getAsRange(); result.append(argAttrRange.begin(), argAttrRange.end()); } else { - result.resize(getNumArguments()); + result.append(getNumArguments(), + DictionaryAttr::get(this->getOperation()->getContext())); } } @@ -479,7 +480,8 @@ auto argAttrRange = argAttrs.template getAsRange(); result.append(argAttrRange.begin(), argAttrRange.end()); } else { - result.resize(getNumResults()); + result.append(getNumResults(), + DictionaryAttr::get(this->getOperation()->getContext())); } }