Skip to content

Commit 2458e15

Browse files
[mlir] Migrate away from a soft-deprecated constructor of APInt (NFC) (llvm#166128)
We have: /// Once all uses of this constructor are migrated to other constructors, /// consider marking this overload ""= delete" to prevent calls from being /// incorrectly bound to the APInt(unsigned, uint64_t, bool) constructor. LLVM_ABI APInt(unsigned numBits, unsigned numWords, const uint64_t bigVal[]); This patch migrates away from this soft-deprecated constructor.
1 parent 96cd0dd commit 2458e15

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

mlir/lib/AsmParser/Parser.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -407,8 +407,8 @@ Parser::parseFloatFromIntegerLiteral(std::optional<APFloat> &result,
407407
"hexadecimal float constant out of range for type");
408408
}
409409

410-
APInt truncatedValue(typeSizeInBits, intValue.getNumWords(),
411-
intValue.getRawData());
410+
APInt truncatedValue(typeSizeInBits,
411+
ArrayRef(intValue.getRawData(), intValue.getNumWords()));
412412
result.emplace(semantics, truncatedValue);
413413
return success();
414414
}

0 commit comments

Comments
 (0)