[PATCH] llvm-cov: Support for big-endianness

Yuchen Wu yuchenericwu at hotmail.com
Wed Dec 18 16:33:01 PST 2013


----------------------------------------
> From: mail at justinbogner.com
> To: llvm-commits at cs.uiuc.edu
> CC: llvm-commits at cs.uiuc.edu
> Subject: Re: [PATCH] llvm-cov: Support for big-endianness
> Date: Wed, 18 Dec 2013 14:33:00 -0800
>
> Yuchen Wu <yuchenericwu at hotmail.com> writes:
>> llvm-cov has been modified to read gcov files produced from big-endian
>> machines. In addition, the instrumentation had to be changed to
>> produce endian-friendly data for reading.
>
> I don't get it. Why wouldn't you just make the file format have a
> consistent byte order (ie, network byte order) if you want to share it
> between machines? Is this awkward detection stuff what gcov does?

Yes, gcov does manual byte-swapping. Are the ntohs, ntohl, etc. APIs portable across different platforms? 		 	   		  



More information about the llvm-commits mailing list