aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2009-04-20 07:36:26 +0000
committerDouglas Gregor <dgregor@apple.com>2009-04-20 07:36:26 +0000
commit3432fa591ca896e5828bbcc83807353b9b6fba2b (patch)
tree43b044cba4579007b27bfc7af9c5eb24f2dd861e
parent6ec07164b4c678645036c0e43007cc9663d2af74 (diff)
Make the on-disk hash table usable with non-file
raw_ostreams. Requires LLVM r69583. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@69584 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/OnDiskHashTable.h5
-rw-r--r--tools/clang-cc/CacheTokens.cpp2
2 files changed, 3 insertions, 4 deletions
diff --git a/include/clang/Basic/OnDiskHashTable.h b/include/clang/Basic/OnDiskHashTable.h
index 5008be16f1..f84b7f24a9 100644
--- a/include/clang/Basic/OnDiskHashTable.h
+++ b/include/clang/Basic/OnDiskHashTable.h
@@ -73,7 +73,7 @@ inline void Emit64(llvm::raw_ostream& Out, uint64_t V) {
Out << (unsigned char)(V >> 56);
}
-inline void Pad(llvm::raw_fd_ostream& Out, unsigned A) {
+inline void Pad(llvm::raw_ostream& Out, unsigned A) {
Offset off = (Offset) Out.tell();
uint32_t n = ((uintptr_t)(off+A-1) & ~(uintptr_t)(A-1)) - off;
for (; n ; --n)
@@ -184,7 +184,7 @@ public:
insert(Buckets, NumBuckets, new (BA.Allocate<Item>()) Item(key, data));
}
- io::Offset Emit(llvm::raw_fd_ostream& out) {
+ io::Offset Emit(llvm::raw_ostream& out) {
using namespace clang::io;
// Emit the payload of the table.
@@ -193,7 +193,6 @@ public:
if (!B.head) continue;
// Store the offset for the data of this bucket.
- // FIXME: need tell() to work on other raw ostreams
B.off = out.tell();
// Write out the number of items in the bucket.
diff --git a/tools/clang-cc/CacheTokens.cpp b/tools/clang-cc/CacheTokens.cpp
index a886ba135a..d9827dfaa3 100644
--- a/tools/clang-cc/CacheTokens.cpp
+++ b/tools/clang-cc/CacheTokens.cpp
@@ -604,7 +604,7 @@ public:
return std::make_pair(n, sizeof(uint32_t));
}
- static void EmitKey(llvm::raw_fd_ostream& Out, PTHIdKey* key, unsigned n) {
+ static void EmitKey(llvm::raw_ostream& Out, PTHIdKey* key, unsigned n) {
// Record the location of the key data. This is used when generating
// the mapping from persistent IDs to strings.
key->FileOffset = Out.tell();