[PATCH] D33014: Fix the Endianness bug by adding the little endian UTF marker.

Ulrich Weigand via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Tue May 9 11:57:03 PDT 2017


uweigand added a comment.

This doesn't look correct either:

  EndianCorrectedNameString[0] = 0xFEFF;

On a big-endian host system, this will set the endian marker to FE FF, i.e. to indicate BE instead of LE.

Probably needs a ulittle16 somewhere to work on both big- and little-endian hosts.


https://reviews.llvm.org/D33014





More information about the llvm-commits mailing list