From 985eaa1a3da2a1b88ea70a65ffd5783aa82ea65e Mon Sep 17 00:00:00 2001 From: Daniel Grumberg Date: Wed, 30 Mar 2022 20:38:09 +0100 Subject: [PATCH] [clang][extract-api][NFC] Don't remap the generated input buffer in PPOpts This was triggering some build failures so removing this change for now. --- clang/lib/ExtractAPI/ExtractAPIConsumer.cpp | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) 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; }