From 8dc69ad4aec84a77e313ab73f6ca0d2bc8824bd5 Mon Sep 17 00:00:00 2001 From: Reid Kleckner Date: Mon, 2 Nov 2015 20:47:31 +0000 Subject: [PATCH] [PTH] Fix data length used for stat cache entries This came up in a boost build, which apparently uses PTH. This was broken in r187619 when we migrated it to uses llvm::fs instead of raw stat calls. Constructing a test case with a hash table collision in-tree is tough. Instead, I have a pending change to OnDiskChainedHashTable that asserts that the reported length of the data agrees with the data actually written. All of the existing in-tree tests find the bug with this assert. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@251828 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Frontend/CacheTokens.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/Frontend/CacheTokens.cpp b/lib/Frontend/CacheTokens.cpp index 662778b7a6..87f3d17258 100644 --- a/lib/Frontend/CacheTokens.cpp +++ b/lib/Frontend/CacheTokens.cpp @@ -106,7 +106,7 @@ public: } unsigned getRepresentationLength() const { - return Kind == IsNoExist ? 0 : 4 + 4 + 2 + 8 + 8; + return Kind == IsNoExist ? 0 : 4 * 8; } }; -- 2.40.0