Go to file
Jessica Paquette b0d17d99dd [MIParser] Ensure getHexUint doesn't produce APInts with a bitwidth of 0
If getHexUint reads in a hex 0, it will create an APInt with a value of 0.
The number of active bits on this APInt is used to calculate the bitwidth of
Result. The number of active bits is defined as an APInt's bitwidth - its
number of leading 0s. Since this APInt is 0, its bitwidth and number of leading
0s are equal.

Thus, Result is constructed with a bitwidth of 0, triggering an APInt assert.

This commit fixes that by checking if the APInt is equal to 0, and setting the
bitwidth to 32 if it is. Otherwise, it sets the bitwidth using getActiveBits.

This caused issues when compiling MIR files with successor probabilities. In
the case that a successor is tagged with a probability of 0, this assert would
fire on debug builds.

https://reviews.llvm.org/D37401

llvm-svn: 312387
2017-09-01 22:17:14 +00:00
clang Driver: extract floating point optimization handling (NFC) 2017-09-01 22:04:24 +00:00
clang-tools-extra [cppcoreguidelines] Don't rely on SmallPtrSet iteration order. 2017-08-30 20:18:40 +00:00
compiler-rt [libFuzzer] use more iterations for a test 2017-09-01 19:45:08 +00:00
debuginfo-tests Fix debuginfo-tests with GDB on Linux 2017-08-31 18:16:55 +00:00
libclc amdgcn: rewrite barrier() using fence and clang __builtin_amdgcn_s_barrier 2017-08-16 17:09:00 +00:00
libcxx [libcxx] [www] Change an absolute link to cxx1z_status.html to be relative. 2017-08-31 17:59:51 +00:00
libcxxabi Revert "[libcxxabi] When built with ASan, __cxa_throw calls __asan_handle_no_return" 2017-08-16 22:05:54 +00:00
libunwind Revert r312240 2017-08-31 15:51:23 +00:00
lld COFF: handle multiply defined symbols with different storage 2017-09-01 22:12:10 +00:00
lldb lldb-mi: -var-update can hang when traversing complex types with pointers 2017-08-31 19:22:33 +00:00
llgo irgen: Create functions instead of global variables for builtin hash and equal algorithms. 2017-06-04 22:11:28 +00:00
llvm [MIParser] Ensure getHexUint doesn't produce APInts with a bitwidth of 0 2017-09-01 22:17:14 +00:00
openmp Use va_copy instead of __va_copy to fix building libomp against musl libc 2017-08-19 23:53:36 +00:00
parallel-libs [Axccel] Remove -Wno-missing-braces in build 2016-12-19 21:34:07 +00:00
polly [ISLNodeBuilder] Materialize Fortran array sizes of arrays without memory accesses. 2017-09-01 18:55:43 +00:00