llvm-cov: Slightly improved error checking.
authorYuchen Wu <yuchenericwu@hotmail.com>
Thu, 14 Nov 2013 00:38:41 +0000 (00:38 +0000)
committerYuchen Wu <yuchenericwu@hotmail.com>
Thu, 14 Nov 2013 00:38:41 +0000 (00:38 +0000)
commit4bd0224887a8de1434186cad2f618c18dea06c0b
tree0672bcc76b8b74756d6221b2a6e37ee587f22da1
parent131a764e0e7abc90b322fd568e042d3c5a0633af
llvm-cov: Slightly improved error checking.

- readInt() should check all 4 bytes can be read, not just 1.
- In the event of false data in the gcno file, it was possible to index
  into a non-existent index of SmallVector, causing assertion error.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@194639 91177308-0d34-0410-b5e6-96231b3b80d8
include/llvm/Support/GCOV.h
lib/IR/GCOV.cpp