diff --git a/clang/lib/ExtractAPI/ExtractAPIConsumer.cpp b/clang/lib/ExtractAPI/ExtractAPIConsumer.cpp index 266acff9a72e..cf95c3d739b6 100644 --- a/clang/lib/ExtractAPI/ExtractAPIConsumer.cpp +++ b/clang/lib/ExtractAPI/ExtractAPIConsumer.cpp @@ -617,17 +617,13 @@ bool ExtractAPIAction::PrepareToExecuteAction(CompilerInstance &CI) { HeaderContents += "\"\n"; } - auto Buffer = llvm::MemoryBuffer::getMemBufferCopy(HeaderContents, - getInputBufferName()); + Buffer = llvm::MemoryBuffer::getMemBufferCopy(HeaderContents, + getInputBufferName()); // Set that buffer up as our "real" input in the CompilerInstance. Inputs.clear(); Inputs.emplace_back(Buffer->getMemBufferRef(), Kind, /*IsSystem*/ false); - // Tell the processor about the input file. - CI.getPreprocessorOpts().addRemappedFile(Buffer->getBufferIdentifier(), - Buffer.release()); - return true; }