TableGen: Avoid undefined behaviour by doing this shift in int64
authorJustin Bogner <mail@justinbogner.com>
Thu, 14 May 2015 06:47:02 +0000 (06:47 +0000)
committerJustin Bogner <mail@justinbogner.com>
Thu, 14 May 2015 06:47:02 +0000 (06:47 +0000)
commitf8ca9784172f263173119f09586815d13113b546
treede5c9b803934373bace4fee989296327574b894c
parentbed1965111fc29929e8b282c489e05c857610fb9
TableGen: Avoid undefined behaviour by doing this shift in int64

Found by ubsan. This was taking a bool and left shifting by 32 - the
result is 64 bit, so we should really do the math in a type it fits
in.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@237345 91177308-0d34-0410-b5e6-96231b3b80d8
lib/TableGen/Record.cpp