summaryrefslogtreecommitdiff
path: root/lib/Serialization/GlobalModuleIndex.cpp
diff options
context:
space:
mode:
authorJustin Bogner <mail@justinbogner.com>2014-03-28 20:32:11 +0000
committerJustin Bogner <mail@justinbogner.com>2014-03-28 20:32:11 +0000
commit0878f15531c6a853d20fa0b8da4a4e77dc034b3f (patch)
treebd0d12c6aadcdcfe460189679780c02b8df2012d /lib/Serialization/GlobalModuleIndex.cpp
parente49de0907803f9ea8326d5e9828a4506e7c58e3d (diff)
downloadclang-0878f15531c6a853d20fa0b8da4a4e77dc034b3f.tar.gz
clang-0878f15531c6a853d20fa0b8da4a4e77dc034b3f.tar.bz2
clang-0878f15531c6a853d20fa0b8da4a4e77dc034b3f.tar.xz
Revert "OnDiskHashTable: Use EndianStream.h to write little endian ostreams"
This reverts commit r205044. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@205047 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Serialization/GlobalModuleIndex.cpp')
-rw-r--r--lib/Serialization/GlobalModuleIndex.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/lib/Serialization/GlobalModuleIndex.cpp b/lib/Serialization/GlobalModuleIndex.cpp
index 14b149f078..ada02efc3f 100644
--- a/lib/Serialization/GlobalModuleIndex.cpp
+++ b/lib/Serialization/GlobalModuleIndex.cpp
@@ -631,12 +631,10 @@ public:
std::pair<unsigned,unsigned>
EmitKeyDataLength(raw_ostream& Out, key_type_ref Key, data_type_ref Data) {
- using namespace llvm::support;
- endian::Writer<little> LE(Out);
unsigned KeyLen = Key.size();
unsigned DataLen = Data.size() * 4;
- LE.write<uint16_t>(KeyLen);
- LE.write<uint16_t>(DataLen);
+ clang::io::Emit16(Out, KeyLen);
+ clang::io::Emit16(Out, DataLen);
return std::make_pair(KeyLen, DataLen);
}
@@ -646,9 +644,8 @@ public:
void EmitData(raw_ostream& Out, key_type_ref Key, data_type_ref Data,
unsigned DataLen) {
- using namespace llvm::support;
for (unsigned I = 0, N = Data.size(); I != N; ++I)
- endian::Writer<little>(Out).write<uint32_t>(Data[I]);
+ clang::io::Emit32(Out, Data[I]);
}
};
@@ -710,10 +707,9 @@ void GlobalModuleIndexBuilder::writeIndex(llvm::BitstreamWriter &Stream) {
SmallString<4096> IdentifierTable;
uint32_t BucketOffset;
{
- using namespace llvm::support;
llvm::raw_svector_ostream Out(IdentifierTable);
// Make sure that no bucket is at offset 0
- endian::Writer<little>(Out).write<uint32_t>(0);
+ clang::io::Emit32(Out, 0);
BucketOffset = Generator.Emit(Out, Trait);
}