Don't allow MCStreamer::EmitIntValue to output 0-byte integers.
authorAlexey Samsonov <vonosmas@gmail.com>
Wed, 20 Aug 2014 22:46:38 +0000 (22:46 +0000)
committerAlexey Samsonov <vonosmas@gmail.com>
Wed, 20 Aug 2014 22:46:38 +0000 (22:46 +0000)
commit9ec471a5d8dbd0da9bb758c71f2ef4486e4e4d49
treeb0af0079209947876a73ba83a9c63c5fbefcb0b3
parentd28e4c17352669a9a685546e0a48dc4aa29cbfd7
Don't allow MCStreamer::EmitIntValue to output 0-byte integers.
It makes no sense and can hide bugs. In particular, it lead
to left shift by 64 bits, which is an undefined behavior,
properly reported by UBSan.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@216134 91177308-0d34-0410-b5e6-96231b3b80d8
lib/MC/MCParser/AsmParser.cpp
lib/MC/MCStreamer.cpp