Lex: Check for 0 buckets on header map construction
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 22 Feb 2016 22:24:22 +0000 (22:24 +0000)
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>
Mon, 22 Feb 2016 22:24:22 +0000 (22:24 +0000)
commit3a7def09fece8d6a403f5002dd4811704fa2b3c4
treecc766a73bec0223cb7be43ad37b6c9c3a02d332c
parent964b70d559fad083744ea2791def82c564087388
Lex: Check for 0 buckets on header map construction

Switch to using `isPowerOf2_32()` to check whether the buckets are a
power of two, and as a side benefit reject loading a header map with no
buckets.  This is a follow-up to r261448.

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