Update prebuilt Clang to r365631c1 from Android.
The version we had was segfaulting.
Bug: 132420445
Change-Id: Icb45a6fe0b4e2166f7895e669df1157cec9fb4e0
diff --git a/linux-x64/clang/include/llvm/Support/LEB128.h b/linux-x64/clang/include/llvm/Support/LEB128.h
index eb43c85..a02b83c 100644
--- a/linux-x64/clang/include/llvm/Support/LEB128.h
+++ b/linux-x64/clang/include/llvm/Support/LEB128.h
@@ -165,6 +165,8 @@
int64_t Value = 0;
unsigned Shift = 0;
uint8_t Byte;
+ if (error)
+ *error = nullptr;
do {
if (end && p == end) {
if (error)
@@ -174,11 +176,11 @@
return 0;
}
Byte = *p++;
- Value |= (int64_t(Byte & 0x7f) << Shift);
+ Value |= (uint64_t(Byte & 0x7f) << Shift);
Shift += 7;
} while (Byte >= 128);
- // Sign extend negative numbers.
- if (Byte & 0x40)
+ // Sign extend negative numbers if needed.
+ if (Shift < 64 && (Byte & 0x40))
Value |= (-1ULL) << Shift;
if (n)
*n = (unsigned)(p - orig_p);