Skip to content
Commit a13f62f5 authored by Pete Cooper's avatar Pete Cooper
Browse files

Use unaligned read to fix UB. NFC.

We were casting a potentially unaligned pointer to uint32_t and
dereferencing.  As the pointer ultimately comes from the object file,
there's no way to guarantee alignment, so use the little32_t read instead.

Also, little32_t knows about endianness, so in theory this may have broken on
big endian machines.

llvm-svn: 264231
parent 6278f933
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment