Using llvm::sys::swapByteOrder() for the common case of byte-swapping a value in...
[oota-llvm.git] / include / llvm / ADT / Hashing.h
index c636226545cbffa6bef1716c8c85c8fa9ca2451b..abf02b8cc9d557e5692a6a3e12f3c38ea4faa703 100644 (file)
@@ -152,7 +152,7 @@ inline uint64_t fetch64(const char *p) {
   uint64_t result;
   memcpy(&result, p, sizeof(result));
   if (sys::IsBigEndianHost)
-    return sys::getSwappedBytes(result);
+    sys::swapByteOrder(result);
   return result;
 }
 
@@ -160,7 +160,7 @@ inline uint32_t fetch32(const char *p) {
   uint32_t result;
   memcpy(&result, p, sizeof(result));
   if (sys::IsBigEndianHost)
-    return sys::getSwappedBytes(result);
+    sys::swapByteOrder(result);
   return result;
 }