Lex: Check buckets on header map construction
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 20 Feb 2016 21:00:58 +0000 (21:00 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Sat, 20 Feb 2016 21:00:58 +0000 (21:00 +0000)
commitdfe85305faa3329c7eb2af865c1e214fc0f177b7
treedda5d9e66981e3249ade3c4c8c191a4bf02f290b
parentdaf0ca234199b4ff5590d2918d67ee5f5db971a3
Lex: Check buckets on header map construction

If the number of buckets is not a power of two, immediately recognize
the header map as corrupt, rather than waiting for the first lookup.  I
converted the later check to an assert.

llvm-svn: 261448
clang/lib/Lex/HeaderMap.cpp
clang/unittests/Lex/HeaderMapTest.cpp