From 7ad629ebefa87269cc1887debc83cfa58c285a80 Mon Sep 17 00:00:00 2001 From: Chris Lattner Date: Tue, 23 Nov 2010 04:40:26 +0000 Subject: [PATCH] tidy up git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@119996 91177308-0d34-0410-b5e6-96231b3b80d8 --- lib/Lex/PTHLexer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/Lex/PTHLexer.cpp b/lib/Lex/PTHLexer.cpp index 3d52159fa3..926f05598b 100644 --- a/lib/Lex/PTHLexer.cpp +++ b/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; -- 2.40.0