[ProfileData] clang-format TextInstrProfReader::hasFormat. NFC.

llvm-svn: 255317
This commit is contained in:
Vedant Kumar 2015-12-11 00:40:05 +00:00
parent 59898d8c68
commit 2491dd118f
1 changed files with 3 additions and 2 deletions

View File

@ -104,7 +104,8 @@ bool TextInstrProfReader::hasFormat(const MemoryBuffer &Buffer) {
// 'reasonable' number of characters (up to profile magic size).
size_t count = std::min(Buffer.getBufferSize(), sizeof(uint64_t));
StringRef buffer = Buffer.getBufferStart();
return count == 0 || std::all_of(buffer.begin(), buffer.begin() + count,
return count == 0 ||
std::all_of(buffer.begin(), buffer.begin() + count,
[](char c) { return ::isprint(c) || ::isspace(c); });
}