[cfe-commits] r49042 - in /cfe/trunk: Driver/SerializationTest.cpp lib/AST/TranslationUnit.cpp lib/Basic/SourceManager.cpp lib/Lex/HeaderMap.cpp

Chris Lattner sabre at nondot.org
Tue Apr 1 11:04:31 PDT 2008


Author: lattner
Date: Tue Apr  1 13:04:30 2008
New Revision: 49042

URL: http://llvm.org/viewvc/llvm-project?rev=49042&view=rev
Log:
Update to match simplified llvm MemoryBuffer interfaces for files.

Modified:
    cfe/trunk/Driver/SerializationTest.cpp
    cfe/trunk/lib/AST/TranslationUnit.cpp
    cfe/trunk/lib/Basic/SourceManager.cpp
    cfe/trunk/lib/Lex/HeaderMap.cpp

Modified: cfe/trunk/Driver/SerializationTest.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Driver/SerializationTest.cpp?rev=49042&r1=49041&r2=49042&view=diff

==============================================================================
--- cfe/trunk/Driver/SerializationTest.cpp (original)
+++ cfe/trunk/Driver/SerializationTest.cpp Tue Apr  1 13:04:30 2008
@@ -163,8 +163,7 @@
   using llvm::MemoryBuffer;
   
   llvm::OwningPtr<MemoryBuffer>
-    MBufferSer(MemoryBuffer::getFile(FNameDeclBefore.c_str(),
-                                     strlen(FNameDeclBefore.c_str())));
+    MBufferSer(MemoryBuffer::getFile(FNameDeclBefore.c_str()));
   
   if(!MBufferSer) {
     llvm::cerr << "ERROR: Cannot read pretty-printed file (pre-pickle).\n";
@@ -172,8 +171,7 @@
   }
   
   llvm::OwningPtr<MemoryBuffer>
-    MBufferDSer(MemoryBuffer::getFile(FNameDeclAfter.c_str(),
-                                      strlen(FNameDeclAfter.c_str())));
+    MBufferDSer(MemoryBuffer::getFile(FNameDeclAfter.c_str()));
   
   if(!MBufferDSer) {
     llvm::cerr << "ERROR: Cannot read pretty-printed file (post-pickle).\n";

Modified: cfe/trunk/lib/AST/TranslationUnit.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/AST/TranslationUnit.cpp?rev=49042&r1=49041&r2=49042&view=diff

==============================================================================
--- cfe/trunk/lib/AST/TranslationUnit.cpp (original)
+++ cfe/trunk/lib/AST/TranslationUnit.cpp Tue Apr  1 13:04:30 2008
@@ -126,8 +126,7 @@
   
   // Create the memory buffer that contains the contents of the file.  
   llvm::OwningPtr<llvm::MemoryBuffer> 
-    MBuffer(llvm::MemoryBuffer::getFile(Filename.c_str(),
-                                        strlen(Filename.c_str())));
+    MBuffer(llvm::MemoryBuffer::getFile(Filename.c_str()));
   
   if (!MBuffer) {
     // FIXME: Provide diagnostic.

Modified: cfe/trunk/lib/Basic/SourceManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/SourceManager.cpp?rev=49042&r1=49041&r2=49042&view=diff

==============================================================================
--- cfe/trunk/lib/Basic/SourceManager.cpp (original)
+++ cfe/trunk/lib/Basic/SourceManager.cpp Tue Apr  1 13:04:30 2008
@@ -43,8 +43,7 @@
   
   // Nope, get information.
   const MemoryBuffer *File =
-    MemoryBuffer::getFile(FileEnt->getName(), strlen(FileEnt->getName()), 0,
-                          FileEnt->getSize());
+    MemoryBuffer::getFile(FileEnt->getName(), 0, FileEnt->getSize());
   if (File == 0)
     return 0;
 

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

==============================================================================
--- cfe/trunk/lib/Lex/HeaderMap.cpp (original)
+++ cfe/trunk/lib/Lex/HeaderMap.cpp Tue Apr  1 13:04:30 2008
@@ -79,8 +79,7 @@
   if (FileSize <= sizeof(HMapHeader)) return 0;
   
   llvm::OwningPtr<const llvm::MemoryBuffer> FileBuffer( 
-    llvm::MemoryBuffer::getFile(FE->getName(), strlen(FE->getName()), 0,
-                                FE->getSize()));
+    llvm::MemoryBuffer::getFile(FE->getName(), 0, FE->getSize()));
   if (FileBuffer == 0) return 0;  // Unreadable file?
   const char *FileStart = FileBuffer->getBufferStart();
 





More information about the cfe-commits mailing list