Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions orc-rt/include/orc-rt/bit.h
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,8 @@ template <typename T, typename = std::enable_if_t<std::is_integral_v<T>>>
#elif defined(_MSC_VER) && !defined(_DEBUG)
return _byteswap_uint64(UV);
#else
uint64_t Hi = llvm::byteswap<uint32_t>(UV);
uint32_t Lo = llvm::byteswap<uint32_t>(UV >> 32);
uint64_t Hi = byteswap<uint32_t>(UV);
uint32_t Lo = byteswap<uint32_t>(UV >> 32);
return (Hi << 32) | Lo;
#endif
} else {
Expand Down
4 changes: 2 additions & 2 deletions orc-rt/unittests/bit-test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ TEST(BitTest, endian) {
#endif
}

TEST(MathTest, byte_swap_32) {
TEST(BitTest, byte_swap_32) {
unsigned char Seq[] = {0x01, 0x23, 0x45, 0x67};
uint32_t X = 0;
memcpy(&X, Seq, sizeof(X));
Expand All @@ -56,7 +56,7 @@ TEST(MathTest, byte_swap_32) {
#endif
}

TEST(MathTest, byte_swap_64) {
TEST(BitTest, byte_swap_64) {
unsigned char Seq[] = {0x01, 0x23, 0x45, 0x67, 0x89, 0xAB, 0xCD, 0xEF};
uint64_t X = 0;
memcpy(&X, Seq, sizeof(X));
Expand Down
Loading