OSDN Git Service

Remove faulty assertion in llvm-pdbutil
authorAdrian McCarthy <amccarth@google.com>
Mon, 16 Apr 2018 17:01:18 +0000 (17:01 +0000)
committerAdrian McCarthy <amccarth@google.com>
Mon, 16 Apr 2018 17:01:18 +0000 (17:01 +0000)
commita14fac4e51e48c6fb9e2e5fc6e33b97eac991193
treea9bd24452f1ec5d8eff7631df891b756d8a1bff4
parent84d38622bdffb95a8de3b6cbf2096bc1b76daffd
Remove faulty assertion in llvm-pdbutil

If a class's first data member is an instance of an empty class, then an
assertion in the PrettyClassLayoutGraphicalDumper would fail. The
storage is reserved, but it's not marked as in use.

As far as I understand, it's the assertion that's faulty, so I removed it
and updated the nearby comment.

Found by running llvm-pdbutil against its own PDB, and this assertion would
fail on HashAdjusters, which is a HashTable whose first data member is a
TraitsT, which is a PdbHashTraits<T>, which is an empty struct. (The struct
has a specialization for uint32_t, but that specialization doesn't apply
here because the T is actually ulittle32_t.)

Differential Revision: https://reviews.llvm.org/D45645

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@330135 91177308-0d34-0410-b5e6-96231b3b80d8
tools/llvm-pdbutil/PrettyClassLayoutGraphicalDumper.cpp