summaryrefslogtreecommitdiffstats
path: root/clangd/GlobalCompilationDatabase.h
diff options
context:
space:
mode:
Diffstat (limited to 'clangd/GlobalCompilationDatabase.h')
-rw-r--r--clangd/GlobalCompilationDatabase.h12
1 files changed, 7 insertions, 5 deletions
diff --git a/clangd/GlobalCompilationDatabase.h b/clangd/GlobalCompilationDatabase.h
index 181b1781..0a97a30e 100644
--- a/clangd/GlobalCompilationDatabase.h
+++ b/clangd/GlobalCompilationDatabase.h
@@ -1,9 +1,8 @@
//===--- GlobalCompilationDatabase.h -----------------------------*- C++-*-===//
//
-// The LLVM Compiler Infrastructure
-//
-// This file is distributed under the University of Illinois Open Source
-// License. See LICENSE.TXT for details.
+// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
+// See https://llvm.org/LICENSE.txt for license information.
+// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
//===----------------------------------------------------------------------===//
@@ -12,6 +11,7 @@
#include "Function.h"
#include "Path.h"
+#include "llvm/ADT/Optional.h"
#include "llvm/ADT/StringMap.h"
#include <memory>
#include <mutex>
@@ -98,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;
@@ -113,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;
};