diff options
author | Chris Lattner <sabre@nondot.org> | 2010-11-23 04:40:26 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2010-11-23 04:40:26 +0000 |
commit | 7c434b69376b77d730eefb01f87519fe83497c41 (patch) | |
tree | 73ea369a8a0f37f709fe081c2de21a4306860784 /clang/lib/Lex/PTHLexer.cpp | |
parent | 5df6f8f55f7a71a5bdc48c3b213624bc8c1354f8 (diff) | |
download | bcm5719-llvm-7c434b69376b77d730eefb01f87519fe83497c41.tar.gz bcm5719-llvm-7c434b69376b77d730eefb01f87519fe83497c41.zip |
tidy up
llvm-svn: 119996
Diffstat (limited to 'clang/lib/Lex/PTHLexer.cpp')
-rw-r--r-- | clang/lib/Lex/PTHLexer.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/clang/lib/Lex/PTHLexer.cpp b/clang/lib/Lex/PTHLexer.cpp index 3d52159fa3b..926f05598b7 100644 --- a/clang/lib/Lex/PTHLexer.cpp +++ b/clang/lib/Lex/PTHLexer.cpp @@ -434,7 +434,7 @@ static void InvalidPTH(Diagnostic &Diags, const char *Msg) { Diags.Report(Diags.getCustomDiagID(Diagnostic::Error, Msg)); } -PTHManager* PTHManager::Create(const std::string& file, FileManager &FileMgr, +PTHManager *PTHManager::Create(const std::string &file, FileManager &FileMgr, const FileSystemOptions &FSOpts, Diagnostic &Diags) { // Memory map the PTH file. @@ -448,11 +448,11 @@ PTHManager* PTHManager::Create(const std::string& file, FileManager &FileMgr, // Get the buffer ranges and check if there are at least three 32-bit // words at the end of the file. - const unsigned char* BufBeg = (unsigned char*)File->getBufferStart(); - const unsigned char* BufEnd = (unsigned char*)File->getBufferEnd(); + const unsigned char *BufBeg = (unsigned char*)File->getBufferStart(); + const unsigned char *BufEnd = (unsigned char*)File->getBufferEnd(); // Check the prologue of the file. - if ((BufEnd - BufBeg) < (signed) (sizeof("cfe-pth") + 3 + 4) || + if ((BufEnd - BufBeg) < (signed)(sizeof("cfe-pth") + 3 + 4) || memcmp(BufBeg, "cfe-pth", sizeof("cfe-pth") - 1) != 0) { Diags.Report(diag::err_invalid_pth_file) << file; return 0; |