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.h5
1 files changed, 4 insertions, 1 deletions
diff --git a/clang-tools-extra/clangd/GlobalCompilationDatabase.h b/clang-tools-extra/clangd/GlobalCompilationDatabase.h
index 3f3bea44d3d..0a97a30e0bd 100644
--- a/clang-tools-extra/clangd/GlobalCompilationDatabase.h
+++ b/clang-tools-extra/clangd/GlobalCompilationDatabase.h
@@ -11,6 +11,7 @@
#include "Function.h"
#include "Path.h"
+#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringMap.h"
#include <memory>
#include <mutex>
@@ -97,7 +98,8 @@ public:
// Base may be null, in which case no entries are inherited.
// FallbackFlags are added to the fallback compile command.
OverlayCDB(const GlobalCompilationDatabase *Base,
- std::vector<std::string> FallbackFlags = {});
+ std::vector<std::string> FallbackFlags = {},
+ llvm::Optional<std::string> ResourceDir = llvm::None);
llvm::Optional<tooling::CompileCommand>
getCompileCommand(PathRef File, ProjectInfo * = nullptr) const override;
@@ -112,6 +114,7 @@ private:
mutable std::mutex Mutex;
llvm::StringMap<tooling::CompileCommand> Commands; /* GUARDED_BY(Mut) */
const GlobalCompilationDatabase *Base;
+ std::string ResourceDir;
std::vector<std::string> FallbackFlags;
CommandChanged::Subscription BaseChanged;
};
OpenPOWER on IntegriCloud