Move Emit24 to clang::io
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97569 91177308-0d34-0410-b5e6-96231b3b80d8
diff --git a/include/clang/Basic/OnDiskHashTable.h b/include/clang/Basic/OnDiskHashTable.h
index 9b50e8d..2019e27 100644
--- a/include/clang/Basic/OnDiskHashTable.h
+++ b/include/clang/Basic/OnDiskHashTable.h
@@ -38,6 +38,13 @@
assert((V >> 16) == 0);
}
+inline void Emit24(llvm::raw_ostream& Out, uint32_t V) {
+ Out << (unsigned char)(V);
+ Out << (unsigned char)(V >> 8);
+ Out << (unsigned char)(V >> 16);
+ assert((V >> 24) == 0);
+}
+
inline void Emit32(llvm::raw_ostream& Out, uint32_t V) {
Out << (unsigned char)(V);
Out << (unsigned char)(V >> 8);
diff --git a/lib/Frontend/CacheTokens.cpp b/lib/Frontend/CacheTokens.cpp
index 7326937..09b5b45 100644
--- a/lib/Frontend/CacheTokens.cpp
+++ b/lib/Frontend/CacheTokens.cpp
@@ -190,12 +190,7 @@
void Emit16(uint32_t V) { ::Emit16(Out, V); }
- void Emit24(uint32_t V) {
- Out << (unsigned char)(V);
- Out << (unsigned char)(V >> 8);
- Out << (unsigned char)(V >> 16);
- assert((V >> 24) == 0);
- }
+ void Emit24(uint32_t V) { ::Emit24(Out, V); }
void Emit32(uint32_t V) { ::Emit32(Out, V); }