diff --git a/mlir/lib/AsmParser/Parser.cpp b/mlir/lib/AsmParser/Parser.cpp index 82bdb844480f1..74936e32bd9d9 100644 --- a/mlir/lib/AsmParser/Parser.cpp +++ b/mlir/lib/AsmParser/Parser.cpp @@ -407,8 +407,8 @@ Parser::parseFloatFromIntegerLiteral(std::optional &result, "hexadecimal float constant out of range for type"); } - APInt truncatedValue(typeSizeInBits, intValue.getNumWords(), - intValue.getRawData()); + APInt truncatedValue(typeSizeInBits, + ArrayRef(intValue.getRawData(), intValue.getNumWords())); result.emplace(semantics, truncatedValue); return success(); }