[Support] Reduce Dependence on Host.h
authorArchibald Elliott <archibald.elliott@arm.com>
Mon, 21 Nov 2022 18:26:49 +0000 (18:26 +0000)
committerArchibald Elliott <archibald.elliott@arm.com>
Mon, 21 Nov 2022 18:28:07 +0000 (18:28 +0000)
commit53d234eab637307955f562974f76742b906024f5
tree15db71dde60cd31fffae699780da93ee06cd966a
parentac93b611659d94fd94b0394e78888b1402cd5199
[Support] Reduce Dependence on Host.h

The intention behind this commit is to reduce the use of Host.h/Host.cpp
in Support, to where it is only necessary.

In this case, the endian-detection and support functionality needed by
these implementations can be provided by `Support/SwapByteOrder.h` in a
cleaner manner.

This patch also changes the byte swap in SHA256.cpp to use the byte swap
function from that header, rather than an inlined implementation.

Differential Revision: https://reviews.llvm.org/D137834
llvm/include/llvm/Support/OnDiskHashTable.h
llvm/lib/Support/FoldingSet.cpp
llvm/lib/Support/SHA1.cpp
llvm/lib/Support/SHA256.cpp