From: Alexey Samsonov Date: Wed, 17 Sep 2014 18:23:07 +0000 (+0000) Subject: Fixup for r217830. Don't do left shifts on negative values X-Git-Url: http://plrg.eecs.uci.edu/git/?a=commitdiff_plain;h=e5d8abe4f19d517e61bb04b0477c3349040c4484;p=oota-llvm.git Fixup for r217830. Don't do left shifts on negative values git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217974 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/llvm/Support/LEB128.h b/include/llvm/Support/LEB128.h index 9e229fbf9cf..6a95432ca2d 100644 --- a/include/llvm/Support/LEB128.h +++ b/include/llvm/Support/LEB128.h @@ -103,7 +103,7 @@ inline int64_t decodeSLEB128(const uint8_t *p, unsigned *n = nullptr) { } while (Byte >= 128); // Sign extend negative numbers. if (Byte & 0x40) - Value |= (-1LL) << Shift; + Value |= (-1ULL) << Shift; if (n) *n = (unsigned)(p - orig_p); return Value;