projects
/
oota-llvm.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e2ff4e4
)
Fixup for r217830. Don't do left shifts on negative values
author
Alexey Samsonov
<vonosmas@gmail.com>
Wed, 17 Sep 2014 18:23:07 +0000
(18:23 +0000)
committer
Alexey Samsonov
<vonosmas@gmail.com>
Wed, 17 Sep 2014 18:23:07 +0000
(18:23 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@217974
91177308
-0d34-0410-b5e6-
96231b3b80d8
include/llvm/Support/LEB128.h
patch
|
blob
|
history
diff --git
a/include/llvm/Support/LEB128.h
b/include/llvm/Support/LEB128.h
index 9e229fbf9cf8d0d14e16c020e9a93ec8bd1704de..6a95432ca2d93c69dd5c89e5186844d75d8f3b81 100644
(file)
--- 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 |= (-1
U
LL) << Shift;
if (n)
*n = (unsigned)(p - orig_p);
return Value;