9 #ifndef LLVM_CLANG_TOOLS_EXTRA_CLANGD_DRAFTSTORE_H 10 #define LLVM_CLANG_TOOLS_EXTRA_CLANGD_DRAFTSTORE_H 14 #include "clang/Basic/LLVM.h" 15 #include "llvm/ADT/StringMap.h" 44 llvm::Expected<std::string>
46 llvm::ArrayRef<TextDocumentContentChangeEvent>
Changes);
52 mutable std::mutex Mutex;
53 llvm::StringMap<std::string> Drafts;
llvm::StringRef PathRef
A typedef to represent a ref to file path.
void addDraft(PathRef File, StringRef Contents)
Replace contents of the draft for File with Contents.
llvm::Expected< std::string > updateDraft(PathRef File, llvm::ArrayRef< TextDocumentContentChangeEvent > Changes)
Update the contents of the draft for File based on Changes.
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
A thread-safe container for files opened in a workspace, addressed by filenames.
std::vector< Path > getActiveFiles() const
void removeDraft(PathRef File)
Remove the draft from the store.
llvm::Optional< std::string > getDraft(PathRef File) const