[cfe-commits] r120012 - in /cfe/trunk: include/clang/Lex/PTHManager.h lib/Frontend/CompilerInstance.cpp lib/Lex/PTHLexer.cpp

Chris Lattner sabre at nondot.org
Tue Nov 23 01:01:31 PST 2010


Author: lattner
Date: Tue Nov 23 03:01:31 2010
New Revision: 120012

URL: http://llvm.org/viewvc/llvm-project?rev=120012&view=rev
Log:
don't allow remapping PTH file paths with -fworking-directory, the
client should just pass in absolute paths.

Modified:
    cfe/trunk/include/clang/Lex/PTHManager.h
    cfe/trunk/lib/Frontend/CompilerInstance.cpp
    cfe/trunk/lib/Lex/PTHLexer.cpp

Modified: cfe/trunk/include/clang/Lex/PTHManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Lex/PTHManager.h?rev=120012&r1=120011&r2=120012&view=diff
==============================================================================
--- cfe/trunk/include/clang/Lex/PTHManager.h (original)
+++ cfe/trunk/include/clang/Lex/PTHManager.h Tue Nov 23 03:01:31 2010
@@ -119,8 +119,7 @@
 
   /// Create - This method creates PTHManager objects.  The 'file' argument
   ///  is the name of the PTH file.  This method returns NULL upon failure.
-  static PTHManager *Create(const std::string& file, FileManager &FileMgr,
-                            Diagnostic &Diags);
+  static PTHManager *Create(const std::string& file, Diagnostic &Diags);
 
   void setPreprocessor(Preprocessor *pp) { PP = pp; }
 

Modified: cfe/trunk/lib/Frontend/CompilerInstance.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Frontend/CompilerInstance.cpp?rev=120012&r1=120011&r2=120012&view=diff
==============================================================================
--- cfe/trunk/lib/Frontend/CompilerInstance.cpp (original)
+++ cfe/trunk/lib/Frontend/CompilerInstance.cpp Tue Nov 23 03:01:31 2010
@@ -180,7 +180,7 @@
   // Create a PTH manager if we are using some form of a token cache.
   PTHManager *PTHMgr = 0;
   if (!PPOpts.TokenCache.empty())
-    PTHMgr = PTHManager::Create(PPOpts.TokenCache, FileMgr, Diags);
+    PTHMgr = PTHManager::Create(PPOpts.TokenCache, Diags);
 
   // Create the Preprocessor.
   HeaderSearch *HeaderInfo = new HeaderSearch(FileMgr);

Modified: cfe/trunk/lib/Lex/PTHLexer.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Lex/PTHLexer.cpp?rev=120012&r1=120011&r2=120012&view=diff
==============================================================================
--- cfe/trunk/lib/Lex/PTHLexer.cpp (original)
+++ cfe/trunk/lib/Lex/PTHLexer.cpp Tue Nov 23 03:01:31 2010
@@ -434,10 +434,9 @@
   Diags.Report(Diags.getCustomDiagID(Diagnostic::Error, Msg));
 }
 
-PTHManager *PTHManager::Create(const std::string &file, FileManager &FileMgr,
-                               Diagnostic &Diags) {
+PTHManager *PTHManager::Create(const std::string &file, Diagnostic &Diags) {
   // Memory map the PTH file.
-  llvm::OwningPtr<llvm::MemoryBuffer> File(FileMgr.getBufferForFile(file));
+  llvm::OwningPtr<llvm::MemoryBuffer> File(llvm::MemoryBuffer::getFile(file));
 
   if (!File) {
     Diags.Report(diag::err_invalid_pth_file) << file;





More information about the cfe-commits mailing list