mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2025-01-29 13:32:33 +00:00
DwarfDebug: MD5 is always little endian, bswap on big endian platforms.
This makes LLVM emit the same signature regardless of host and target endianess. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@187304 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
214de30d9d
commit
1faea8f086
@ -1059,8 +1059,9 @@ static void addDIEODRSignature(MD5 &Hash, CompileUnit *CU, DIE *Die) {
|
||||
Hash.final(Result);
|
||||
|
||||
// ... take the least significant 8 bytes and store those as the attribute.
|
||||
uint64_t Signature;
|
||||
memcpy(&Signature, &Result[8], 8);
|
||||
// Our MD5 implementation always returns its results in little endian, swap
|
||||
// bytes appropriately.
|
||||
uint64_t Signature = *reinterpret_cast<support::ulittle64_t *>(Result + 8);
|
||||
|
||||
// FIXME: This should be added onto the type unit, not the type, but this
|
||||
// works as an intermediate stage.
|
||||
|
Loading…
x
Reference in New Issue
Block a user