Index: llvm/tools/llvm-readobj/WindowsResourceDumper.cpp =================================================================== --- llvm/tools/llvm-readobj/WindowsResourceDumper.cpp +++ llvm/tools/llvm-readobj/WindowsResourceDumper.cpp @@ -29,7 +29,7 @@ for (UTF16 Ch : UTF16Str) { // UTF16Str will have swapped byte order in case of big-endian machines. // Swap it back in such a case. - support::ulittle16_t ChValue(Ch); + uint16_t ChValue = support::endian::byte_swap(Ch, support::little); if (ChValue <= 0xFF) Result += ChValue; else