Update for Clang API change.
git-svn-id: https://llvm.org/svn/llvm-project/clang-tools-extra/trunk@216615 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
Родитель
32c01528ac
Коммит
2724b35792
|
@ -188,9 +188,8 @@ bool applyFormatting(const std::vector<tooling::Replacement> &Replacements,
|
|||
|
||||
FileManager Files((FileSystemOptions()));
|
||||
SourceManager SM(Diagnostics, Files);
|
||||
SM.overrideFileContents(
|
||||
Files.getFile(FileName),
|
||||
llvm::MemoryBuffer::getMemBufferCopy(FileData).release());
|
||||
SM.overrideFileContents(Files.getFile(FileName),
|
||||
llvm::MemoryBuffer::getMemBufferCopy(FileData));
|
||||
Rewriter Rewrites(SM, LangOptions());
|
||||
|
||||
return getRewrittenData(FormattingReplacements, Rewrites, FormattedFileData);
|
||||
|
|
|
@ -63,7 +63,7 @@ public:
|
|||
llvm::MemoryBuffer::getMemBuffer(I->Code);
|
||||
const FileEntry *Entry = SM.getFileManager().getVirtualFile(
|
||||
I->FileName, Buf->getBufferSize(), /*ModificationTime=*/0);
|
||||
SM.overrideFileContents(Entry, Buf.release());
|
||||
SM.overrideFileContents(Entry, std::move(Buf));
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче