From 2d009f0655c2c5da9653bd358bd22f2fe8e66885 Mon Sep 17 00:00:00 2001 From: Justin Bogner Date: Fri, 28 Mar 2014 20:32:17 +0000 Subject: Revert "OnDiskHashTable: Use Endian.h to read little endian ostreams" This reverts commit r205045. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205048 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Serialization/GlobalModuleIndex.cpp | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'lib/Serialization/GlobalModuleIndex.cpp') diff --git a/lib/Serialization/GlobalModuleIndex.cpp b/lib/Serialization/GlobalModuleIndex.cpp index ada02efc3f..b9e6130bad 100644 --- a/lib/Serialization/GlobalModuleIndex.cpp +++ b/lib/Serialization/GlobalModuleIndex.cpp @@ -82,9 +82,9 @@ public: static std::pair ReadKeyDataLength(const unsigned char*& d) { - using namespace llvm::support; - unsigned KeyLen = endian::readNext(d); - unsigned DataLen = endian::readNext(d); + using namespace clang::io; + unsigned KeyLen = ReadUnalignedLE16(d); + unsigned DataLen = ReadUnalignedLE16(d); return std::make_pair(KeyLen, DataLen); } @@ -101,11 +101,11 @@ public: static data_type ReadData(const internal_key_type& k, const unsigned char* d, unsigned DataLen) { - using namespace llvm::support; + using namespace clang::io; data_type Result; while (DataLen > 0) { - unsigned ID = endian::readNext(d); + unsigned ID = ReadUnalignedLE32(d); Result.push_back(ID); DataLen -= 4; } @@ -459,8 +459,8 @@ namespace { unsigned DataLen) { // The first bit indicates whether this identifier is interesting. // That's all we care about. - using namespace llvm::support; - unsigned RawID = endian::readNext(d); + using namespace clang::io; + unsigned RawID = ReadUnalignedLE32(d); bool IsInteresting = RawID & 0x01; return std::make_pair(k, IsInteresting); } -- cgit v1.2.3