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,7 @@ auto argAttrRange = argAttrs.template getAsRange(); result.append(argAttrRange.begin(), argAttrRange.end()); } else { - result.resize(getNumArguments()); + result.append(getNumArguments(), DictionaryAttr()); } } @@ -479,7 +479,7 @@ auto argAttrRange = argAttrs.template getAsRange(); result.append(argAttrRange.begin(), argAttrRange.end()); } else { - result.resize(getNumResults()); + result.append(getNumResults(), DictionaryAttr()); } }