Move Emit24 to clang::io

llvm-svn: 97569
This commit is contained in:
Kovarththanan Rajaratnam 2010-03-02 17:41:26 +00:00
parent 9bc6b7fc53
commit daca645655
2 changed files with 8 additions and 6 deletions

View 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);

View 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); }