diff options
| author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-03-21 20:42:37 +0000 |
|---|---|---|
| committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2014-03-21 20:42:37 +0000 |
| commit | 745a2bf0b8b9f7bb68d033b165ad77dc71c73b94 (patch) | |
| tree | 7b775a75fee0ae97943ab9bed417e15c1417db0c /llvm/lib | |
| parent | 4c5b7cb1fca96d354d355aa633c1bf2f2da76ea4 (diff) | |
| download | bcm5719-llvm-745a2bf0b8b9f7bb68d033b165ad77dc71c73b94.tar.gz bcm5719-llvm-745a2bf0b8b9f7bb68d033b165ad77dc71c73b94.zip | |
InstrProf: Change magic number to have non-text characters
Include non-text characters in the magic number so that text files can't
match.
<rdar://problem/15950346>
llvm-svn: 204513
Diffstat (limited to 'llvm/lib')
| -rw-r--r-- | llvm/lib/ProfileData/InstrProfReader.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/llvm/lib/ProfileData/InstrProfReader.cpp b/llvm/lib/ProfileData/InstrProfReader.cpp index a95d9bc3b08..f923ad2ddd9 100644 --- a/llvm/lib/ProfileData/InstrProfReader.cpp +++ b/llvm/lib/ProfileData/InstrProfReader.cpp @@ -90,14 +90,14 @@ RawInstrProfReader::RawInstrProfReader(std::unique_ptr<MemoryBuffer> DataBuffer) static uint64_t getRawMagic() { return - uint64_t('l') << 56 | - uint64_t('p') << 48 | - uint64_t('r') << 40 | - uint64_t('o') << 32 | - uint64_t('f') << 24 | - uint64_t('r') << 16 | - uint64_t('a') << 8 | - uint64_t('w'); + uint64_t(255) << 56 | + uint64_t('l') << 48 | + uint64_t('p') << 40 | + uint64_t('r') << 32 | + uint64_t('o') << 24 | + uint64_t('f') << 16 | + uint64_t('r') << 8 | + uint64_t(129); } bool RawInstrProfReader::hasFormat(const MemoryBuffer &DataBuffer) { |

