Remove the last use of PathWithStatus.

llvm-svn: 184909
This commit is contained in:
Rafael Espindola 2013-06-26 04:12:57 +00:00
parent bc4aa5547e
commit a96bd562c2
1 changed files with 4 additions and 4 deletions

View 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?