[cfe-commits] r67424 - /cfe/trunk/lib/Lex/PTHLexer.cpp

Ted Kremenek kremenek at apple.com
Fri Mar 20 17:25:10 PDT 2009


Author: kremenek
Date: Fri Mar 20 19:25:09 2009
New Revision: 67424

URL: http://llvm.org/viewvc/llvm-project?rev=67424&view=rev
Log:
Add back warning about a PTH file not containing any identifiers, but don't make
it a hard error.

Modified:
    cfe/trunk/lib/Lex/PTHLexer.cpp

Modified: cfe/trunk/lib/Lex/PTHLexer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PTHLexer.cpp?rev=67424&r1=67423&r2=67424&view=diff

==============================================================================
--- cfe/trunk/lib/Lex/PTHLexer.cpp (original)
+++ cfe/trunk/lib/Lex/PTHLexer.cpp Fri Mar 20 19:25:09 2009
@@ -675,6 +675,12 @@
 
   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);





More information about the cfe-commits mailing list