diff options
author | Douglas Gregor <dgregor@apple.com> | 2009-04-20 19:03:54 +0000 |
---|---|---|
committer | Douglas Gregor <dgregor@apple.com> | 2009-04-20 19:03:54 +0000 |
commit | 24022803af76734534d7b506137142d8df5b457d (patch) | |
tree | 86332c4b900c5d9a70c4a277f4aac53242b28457 | |
parent | f60c63af0ed33ab890600ee6146e7685901f46df (diff) |
Allow the Info type used in the on-disk hash table generator to have state
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69616 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Basic/OnDiskHashTable.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/include/clang/Basic/OnDiskHashTable.h b/include/clang/Basic/OnDiskHashTable.h index f84b7f24a9..631d497f1a 100644 --- a/include/clang/Basic/OnDiskHashTable.h +++ b/include/clang/Basic/OnDiskHashTable.h @@ -184,7 +184,12 @@ public: insert(Buckets, NumBuckets, new (BA.Allocate<Item>()) Item(key, data)); } - io::Offset Emit(llvm::raw_ostream& out) { + io::Offset Emit(llvm::raw_ostream &out) { + Info InfoObj; + return Emit(out, InfoObj); + } + + io::Offset Emit(llvm::raw_ostream &out, Info &InfoObj) { using namespace clang::io; // Emit the payload of the table. @@ -202,9 +207,9 @@ public: for (Item *I = B.head; I ; I = I->next) { Emit32(out, I->hash); const std::pair<unsigned, unsigned>& Len = - Info::EmitKeyDataLength(out, I->key, I->data); - Info::EmitKey(out, I->key, Len.first); - Info::EmitData(out, I->key, I->data, Len.second); + InfoObj.EmitKeyDataLength(out, I->key, I->data); + InfoObj.EmitKey(out, I->key, Len.first); + InfoObj.EmitData(out, I->key, I->data, Len.second); } } |