]> granicus.if.org Git - clang/commit
OnDiskHashTable: Make the iterable version separate.
authorJustin Bogner <mail@justinbogner.com>
Mon, 14 Apr 2014 16:34:29 +0000 (16:34 +0000)
committerJustin Bogner <mail@justinbogner.com>
Mon, 14 Apr 2014 16:34:29 +0000 (16:34 +0000)
commited3bdc5f9ada3d87f1a7e7892305d240edd15c68
tree28fe7d68afdcce419228dc77a494ea2b8797e85b
parentcbfcdc489635daac33b920325139396b41664990
OnDiskHashTable: Make the iterable version separate.

Currently the on disk hash table's key_iterator and data_iterator make
the assumption that the table data starts exactly four bytes after the
base of the table. This happens to be true for all of the tables we
currently iterate over, but not for all of the OnDiskHashTables we
currently use. For example, key_ and data_iterator would iterate over
meaningless data if they were used on the hash tables in PTHLexer.

We make the API safer by breaking this into two types. One doesn't
have the iterators, and the other must be told where the payload
starts.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@206189 91177308-0d34-0410-b5e6-96231b3b80d8
include/clang/Basic/OnDiskHashTable.h
include/clang/Serialization/ASTReader.h
include/clang/Serialization/Module.h
lib/Serialization/ASTReader.cpp
lib/Serialization/ASTReaderInternals.h
lib/Serialization/GlobalModuleIndex.cpp