[gcov] Fix big-endian problems
authorFangrui Song <maskray@google.com>
Tue, 12 May 2020 05:30:49 +0000 (22:30 -0700)
committerFangrui Song <maskray@google.com>
Tue, 12 May 2020 05:36:46 +0000 (22:36 -0700)
commitf98709a982b358a2df3ee6103c8b9a81cbc81d26
tree25bf4087b29e1afa9f649f0ecfbbc4b5a5a482c1
parent4c684b91d562d96ab5a34bb989693e92ba9ec9eb
[gcov] Fix big-endian problems

In a big-endian .gcda file, the first four bytes are "gcda" instead of "adcg".
All 32-bit values are in big-endian.

With this change, libclang_rt.profile can hopefully produce gcov
compatible output.
compiler-rt/lib/profile/GCDAProfiling.c