From a5315ff899f7f813411e0d4a3226b6c1b07ca289 Mon Sep 17 00:00:00 2001 From: Boris Buegling Date: Wed, 25 Oct 2023 11:29:53 -0700 Subject: [PATCH] load => loadUnaligned Same fix as https://github.com/apple/swift-package-manager/pull/6929 since the code in swift-syntax is based on what is in SwiftPM. --- Sources/SwiftCompilerPlugin/CompilerPlugin.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Sources/SwiftCompilerPlugin/CompilerPlugin.swift b/Sources/SwiftCompilerPlugin/CompilerPlugin.swift index 69766b44c73..c16a8390c85 100644 --- a/Sources/SwiftCompilerPlugin/CompilerPlugin.swift +++ b/Sources/SwiftCompilerPlugin/CompilerPlugin.swift @@ -198,7 +198,7 @@ internal struct PluginHostConnection: MessageConnection { // Decode the count. let count = header.withUnsafeBytes { - UInt64(littleEndian: $0.load(as: UInt64.self)) + UInt64(littleEndian: $0.loadUnaligned(as: UInt64.self)) } guard count >= 2 else { throw PluginMessageError.invalidPayloadSize