aboutsummaryrefslogtreecommitdiff
path: root/lib/Lex/PTHLexer.cpp
diff options
context:
space:
mode:
authorTed Kremenek <kremenek@apple.com>2009-03-21 00:25:09 +0000
committerTed Kremenek <kremenek@apple.com>2009-03-21 00:25:09 +0000
commit783bb7494c0551d1826afa5c005cc4a9afb16b6a (patch)
treecf33d467eb0ae02aa3874f0187f95465b6f20469 /lib/Lex/PTHLexer.cpp
parent8fbc44d540eb7b9dabef71ba616c9102a2eaa71a (diff)
Add back warning about a PTH file not containing any identifiers, but don't make
it a hard error. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@67424 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Lex/PTHLexer.cpp')
-rw-r--r--lib/Lex/PTHLexer.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/Lex/PTHLexer.cpp b/lib/Lex/PTHLexer.cpp
index b5f5afd81a..e547ce551b 100644
--- a/lib/Lex/PTHLexer.cpp
+++ b/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);