]> granicus.if.org Git - clang/commitdiff
Remove the last use of PathWithStatus.
authorRafael Espindola <rafael.espindola@gmail.com>
Wed, 26 Jun 2013 04:12:57 +0000 (04:12 +0000)
committerRafael Espindola <rafael.espindola@gmail.com>
Wed, 26 Jun 2013 04:12:57 +0000 (04:12 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@184909 91177308-0d34-0410-b5e6-96231b3b80d8

lib/Frontend/ASTUnit.cpp

index 2633e3c11e911ae43b21e7de0662999212f02762..94f6d2686d5e4d21d338a614352ad147775ed68e 100644 (file)
@@ -1548,11 +1548,11 @@ llvm::MemoryBuffer *ASTUnit::getMainBufferWithPrecompiledPreamble(
   memset(const_cast<char*>(PreambleBuffer->getBufferStart()) + Preamble.size(), 
          ' ', PreambleReservedSize - Preamble.size() - 1);
   const_cast<char*>(PreambleBuffer->getBufferEnd())[-1] = '\n';  
-  
+
   // Remap the main source file to the preamble buffer.
-  llvm::sys::PathWithStatus MainFilePath(FrontendOpts.Inputs[0].getFile());
-  PreprocessorOpts.addRemappedFile(MainFilePath.str(), PreambleBuffer);
-  
+  StringRef MainFilePath = FrontendOpts.Inputs[0].getFile();
+  PreprocessorOpts.addRemappedFile(MainFilePath, PreambleBuffer);
+
   // Tell the compiler invocation to generate a temporary precompiled header.
   FrontendOpts.ProgramAction = frontend::GeneratePCH;
   // FIXME: Generate the precompiled header into memory?