diff options
author | Ted Kremenek <kremenek@apple.com> | 2009-03-21 00:25:09 +0000 |
---|---|---|
committer | Ted Kremenek <kremenek@apple.com> | 2009-03-21 00:25:09 +0000 |
commit | f97c47ca158aa6263266a3b64901a1ed200df511 (patch) | |
tree | 14f25d4a924099a2be73349174c53d1ef426ef4a /clang/lib/Lex/PTHLexer.cpp | |
parent | b12f24116d8d356b750ba0a11d9f80ea696fe9fd (diff) | |
download | bcm5719-llvm-f97c47ca158aa6263266a3b64901a1ed200df511.tar.gz bcm5719-llvm-f97c47ca158aa6263266a3b64901a1ed200df511.zip |
Add back warning about a PTH file not containing any identifiers, but don't make
it a hard error.
llvm-svn: 67424
Diffstat (limited to 'clang/lib/Lex/PTHLexer.cpp')
-rw-r--r-- | clang/lib/Lex/PTHLexer.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Lex/PTHLexer.cpp b/clang/lib/Lex/PTHLexer.cpp index b5f5afd81ab..e547ce551b9 100644 --- a/clang/lib/Lex/PTHLexer.cpp +++ b/clang/lib/Lex/PTHLexer.cpp @@ -675,6 +675,12 @@ PTHManager* PTHManager::Create(const std::string& file, Diagnostic* Diags) { llvm::OwningPtr<PTHStringIdLookup> SL(PTHStringIdLookup::Create(StringIdTable, BufBeg)); + + // Issue a warning about the PTH file containing no identifiers. + if (!FL->isEmpty() && SL->isEmpty()) { + InvalidPTH(Diags, "PTH file contains no identifiers."); + } + // Get the location of the spelling cache. const unsigned char* spellingBaseOffset = PrologueOffset + sizeof(uint32_t)*3; const unsigned char* spellingBase = BufBeg + ReadLE32(spellingBaseOffset); |