Fix DenseMap with APInt keys
authorWeverything <rtrieu@google.com>
Tue, 4 Oct 2022 21:34:10 +0000 (14:34 -0700)
committerWeverything <rtrieu@google.com>
Tue, 1 Nov 2022 23:23:32 +0000 (16:23 -0700)
commitcbdb81e60b45e90996541f2661bad99606bfda06
treea47959ae3d2dc270dc665aaabe74c91957febbd8
parentf357a412654cf5ae750a14b6f56900aaa029cec2
Fix DenseMap with APInt keys

The empty key value for APInt was colliding with a valid zero-width
APInt.  Change the internal value of empty key and tombstone values
for APInt to avoid this collision.

Fixes: https://github.com/llvm/llvm-project/issues/58013

Differential Revision: https://reviews.llvm.org/D135741
llvm/include/llvm/ADT/APInt.h
llvm/unittests/ADT/APIntTest.cpp