]> granicus.if.org Git - clang/commitdiff
Move Emit24 to clang::io
authorKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>
Tue, 2 Mar 2010 17:41:26 +0000 (17:41 +0000)
committerKovarththanan Rajaratnam <kovarththanan.rajaratnam@gmail.com>
Tue, 2 Mar 2010 17:41:26 +0000 (17:41 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@97569 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/OnDiskHashTable.h
lib/Frontend/CacheTokens.cpp

index 9b50e8df02b92ddde120883d52c996964a877273..2019e27ce5de71766fdddbff4b851d9a853e86dc 100644 (file)
@@ -38,6 +38,13 @@ inline void Emit16(llvm::raw_ostream& Out, uint32_t V) {
   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);
index 7326937e520a74018abd378280948585c9bc502a..09b5b458e93a9d9276ea14b91194f33136851315 100644 (file)
@@ -190,12 +190,7 @@ class PTHWriter {
 
   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); }