Skip to content

Commit 345c601

Browse files
committed
Address some overload deprecations in llvm::support::endian
See: * llvm/llvm-project#161045 * llvm/llvm-project#160979
1 parent 403bb36 commit 345c601

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

lib/Tooling/libSwiftScan/SwiftCaching.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -397,9 +397,8 @@ createCachedCompilation(SwiftScanCAS &CAS, const llvm::cas::CASID &ID,
397397
return KeyProxy.takeError();
398398
auto Input = KeyProxy->getData();
399399

400-
unsigned Index =
401-
llvm::support::endian::read<uint32_t, llvm::endianness::little,
402-
llvm::support::unaligned>(Input.data());
400+
unsigned Index = llvm::support::endian::read<uint32_t>(
401+
Input.data(), llvm::endianness::little);
403402
{
404403
swift::cas::CompileJobResultSchema Schema(CAS.getCAS());
405404
if (Schema.isRootNode(*Proxy)) {

tools/libMockPlugin/MockPlugin.cpp

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -240,9 +240,8 @@ int TestRunner::run() {
240240
llvm::SmallVector<char, 0> response_data;
241241
llvm::raw_svector_ostream(response_data) << response;
242242
auto response_size = response_data.size();
243-
auto response_header =
244-
llvm::support::endian::byte_swap<uint64_t, llvm::endianness::little>(
245-
response_size);
243+
auto response_header = llvm::support::endian::byte_swap<uint64_t>(
244+
response_size, llvm::endianness::little);
246245
ioSize = fwrite(&response_header, sizeof(response_header), 1, stdout);
247246
if (!ioSize) {
248247
llvm::errs() << "failed to write response header\n";

0 commit comments

Comments
 (0)