[wpiutil] Upgrade to LLVM 17.0.1 (#5482)

This commit is contained in:
Tyler Veness
2023-09-21 19:54:33 -07:00
committed by GitHub
parent 07a0d22fe6
commit 1b6ec5a95d
82 changed files with 1697 additions and 901 deletions

View File

@@ -73,7 +73,7 @@ std::optional<uint64_t> WireDecoder3::SimpleValueReader::Read64(
std::optional<double> WireDecoder3::SimpleValueReader::ReadDouble(
std::span<const uint8_t>* in) {
if (auto val = Read64(in)) {
return wpi::BitsToDouble(val.value());
return wpi::bit_cast<double>(val.value());
} else {
return std::nullopt;
}

View File

@@ -32,7 +32,7 @@ static void Write32(wpi::raw_ostream& os, uint32_t val) {
static void WriteDouble(wpi::raw_ostream& os, double val) {
// The highest performance way to do this, albeit non-portable.
uint64_t v = wpi::DoubleToBits(val);
uint64_t v = wpi::bit_cast<uint64_t>(val);
os << std::span<const uint8_t>{{static_cast<uint8_t>((v >> 56) & 0xff),
static_cast<uint8_t>((v >> 48) & 0xff),
static_cast<uint8_t>((v >> 40) & 0xff),