Switch to using LEB encoding for key and data lengths in on-disk hash
authorRichard Smith <richard@metafoo.co.uk>
Fri, 19 Feb 2021 00:24:01 +0000 (16:24 -0800)
committerRichard Smith <richard@metafoo.co.uk>
Fri, 19 Feb 2021 01:19:01 +0000 (17:19 -0800)
commite0589d70fb8e29842fab228df716f73b378710a6
tree29dff7ff0d71a04498dbd1b8e7f808c057dd53eb
parent3cd70fc59d2a1a907d14bbf3f2dfe53d2c2be9d1
Switch to using LEB encoding for key and data lengths in on-disk hash
tables.

This gives a modest AST file size reduction, while also fixing crashes
in cases where the key or data length doesn't fit into 16 bits.
Unfortunately, such situations tend to require huge test cases (such as
more than 16K modules or an overload set with 16K entries), and I
couldn't get a testcase to finish in a reasonable amount of time, so no
test is included for that bugfix.

No functionality change intended (other than the bugfix).
clang/include/clang/Serialization/ModuleFile.h
clang/lib/Serialization/ASTReader.cpp
clang/lib/Serialization/ASTWriter.cpp