Fix another UBSan test error from r248897 and follow on fix r249689
authorTeresa Johnson <tejohnson@google.com>
Thu, 8 Oct 2015 20:52:23 +0000 (20:52 +0000)
committerTeresa Johnson <tejohnson@google.com>
Thu, 8 Oct 2015 20:52:23 +0000 (20:52 +0000)
commita8d99b7b3dfa847ccb15ddf296abc0c96459b721
tree21a8a233c07d0d8c519d51a036f980ff3dfd5cf1
parenta0c78643cb44cbc42d065001f6549632e70fcfce
Fix another UBSan test error from r248897 and follow on fix r249689

While here fix a few more issues with potential overflow and add
new tests for these cases. Ensured that test now passes with UBSan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@249745 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/Endian.h
unittests/Support/EndianTest.cpp