llvm.org GIT mirror llvm / e382065
ProfileData: Avoid UB when reading git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@206674 91177308-0d34-0410-b5e6-96231b3b80d8 Justin Bogner 6 years ago
1 changed file(s) with 3 addition(s) and 2 deletion(s). Raw diff Collapse all Expand all
221221 static std::pair
222222 ReadKeyDataLength(const unsigned char *&D) {
223223 using namespace support;
224 return std::make_pair(endian::readNext(D),
225 endian::readNext(D));
224 offset_type KeyLen = endian::readNext(D);
225 offset_type DataLen = endian::readNext(D);
226 return std::make_pair(KeyLen, DataLen);
226227 }
227228
228229 StringRef ReadKey(const unsigned char *D, unsigned N) {