PreambleParsedCallback PreambleCallback) {
// Note that we don't need to copy the input contents, preamble can live
// without those.
- auto ContentsBuffer = llvm::MemoryBuffer::getMemBuffer(Inputs.Contents);
+ auto ContentsBuffer =
+ llvm::MemoryBuffer::getMemBuffer(Inputs.Contents, FileName);
auto Bounds =
ComputePreambleBounds(*CI.getLangOpts(), ContentsBuffer.get(), 0);
// dirs.
}
- return ParsedAST::build(llvm::make_unique<CompilerInvocation>(*Invocation),
- Preamble,
- llvm::MemoryBuffer::getMemBufferCopy(Inputs.Contents),
- std::move(VFS), Inputs.Index, Inputs.Opts);
+ return ParsedAST::build(
+ llvm::make_unique<CompilerInvocation>(*Invocation), Preamble,
+ llvm::MemoryBuffer::getMemBufferCopy(Inputs.Contents, FileName),
+ std::move(VFS), Inputs.Index, Inputs.Opts);
}
SourceLocation getBeginningOfIdentifier(const ParsedAST &Unit,