summaryrefslogtreecommitdiffstats
path: root/clang-tools-extra/clangd/GlobalCompilationDatabase.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang-tools-extra/clangd/GlobalCompilationDatabase.h')
-rw-r--r--clang-tools-extra/clangd/GlobalCompilationDatabase.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/clang-tools-extra/clangd/GlobalCompilationDatabase.h b/clang-tools-extra/clangd/GlobalCompilationDatabase.h
index 933e566545b..36c130c3512 100644
--- a/clang-tools-extra/clangd/GlobalCompilationDatabase.h
+++ b/clang-tools-extra/clangd/GlobalCompilationDatabase.h
@@ -25,6 +25,9 @@ struct CompileCommand;
namespace clangd {
+/// Returns a default compile command to use for \p File.
+tooling::CompileCommand getDefaultCompileCommand(PathRef File);
+
/// Provides compilation arguments used for building ClangdUnit.
class GlobalCompilationDatabase {
public:
@@ -45,6 +48,8 @@ public:
std::vector<tooling::CompileCommand>
getCompileCommands(PathRef File) override;
+ void setExtraFlagsForFile(PathRef File, std::vector<std::string> ExtraFlags);
+
private:
tooling::CompilationDatabase *getCompilationDatabase(PathRef File);
@@ -53,6 +58,9 @@ private:
/// directories).
llvm::StringMap<std::unique_ptr<clang::tooling::CompilationDatabase>>
CompilationDatabases;
+
+ /// Stores extra flags per file.
+ llvm::StringMap<std::vector<std::string>> ExtraFlagsForFile;
};
} // namespace clangd
} // namespace clang
OpenPOWER on IntegriCloud