Commit Graph

9 Commits

Author SHA1 Message Date
Ben Barham
cacfd3e3ae Rename llvm::support::endianness to llvm::endianness
LLVM is gearing up to move to `std::endianness` and as part of that has
moved `llvm::support::endianness` to `llvm::endianness`
(bbdbcd83e6702f314d147a680247058a899ba261). Rename our uses.
2024-04-08 08:58:58 -07:00
Evan Wilde
6cc002012f Update ByteStream APIs from 32 to 64 bit
The ByteStream APIs were updated from 32 to 64 bits in LLVM.

Updating methods in the ExponentialGrowthAppendingBinaryByteStream.
2021-10-21 13:40:42 -07:00
Michael Munday
ce3aff12da [Basic] Always serialize integers in little-endian byte order
This change fixes the ExponentialGrowthAppendingBinaryByteStream
tests on big endian machines.

Force ExponentialGrowthAppendingBinaryByteStreams to use little-
endian byte order. We always used little-endian byte order anyway
and it seems very unlikely we'll need the flexibility to make the
stream big-endian in the future. The benefit of this is that we
can use portable APIs while still allowing the compiler to remove
conditional byte swaps.

Also replace writeRaw with writeInteger and make it explicitly
little-endian to make the API cleaner and more portable.
2019-07-02 11:36:58 -04:00
moatom
2e95a0d265 Fix include guards 2019-06-02 12:10:43 +09:00
Adrian Prantl
ff63eaea6f Remove \brief commands from doxygen comments.
We've been running doxygen with the autobrief option for a couple of
years now. This makes the \brief markers into our comments
redundant. Since they are a visual distraction and we don't want to
encourage more \brief markers in new code either, this patch removes
them all.

Patch produced by

      for i in $(git grep -l '\\brief'); do perl -pi -e 's/\\brief //g' $i & done
2018-12-04 15:45:04 -08:00
Brent Royal-Gordon
0412f61c35 [Basic] Use memcpy() for a possibly unaligned copy
ExponentialGrowthAppendingBinaryByteStream::writeRaw() is sometimes used for unaligned writes, so it shouldn’t be casting and dereferencing pointers. Tests in Godbolt indicate that the call to memcpy() is optimized into similar instructions anyway.
2018-08-29 22:53:40 -07:00
Alex Hoppen
33d86d5cb6 [byteTree] Write fixed sized data using an optimized form
If we know the size of a type at compile time (like we do for all the
integer types), it is cheaper to assign the data buffer directly instead
of using a memcpy.
2018-08-24 15:27:23 -07:00
Alex Hoppen
49f2e14094 [swiftBasic] Use a SmallVector as the underlying storage for ExponentialGrowthAppendingBinaryByteStream 2018-08-23 09:00:27 -07:00
Alex Hoppen
ff68452301 [swiftBasic] Introduce an exponentially growing appending binary stream
It is more efficient than llvm::AppendingBinaryByteStream if a lot of
small data gets appended to it because it doesn't need to resize its
buffer on each write.
2018-08-23 08:14:02 -07:00