Skip to content

Commit 1e66df4

Browse files
fsfodvgvassilev
authored andcommitted
Add extern template declarations for PragmaHandler, ToolExecutorPlugin and CompilationDatabasePlugin registry in clang
1 parent e9d5a9b commit 1e66df4

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

clang/include/clang/Lex/Preprocessor.h

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,7 @@
3232
#include "clang/Lex/PPEmbedParameters.h"
3333
#include "clang/Lex/Token.h"
3434
#include "clang/Lex/TokenLexer.h"
35+
#include "clang/Support/Compiler.h"
3536
#include "llvm/ADT/APSInt.h"
3637
#include "llvm/ADT/ArrayRef.h"
3738
#include "llvm/ADT/DenseMap.h"
@@ -3060,4 +3061,8 @@ using PragmaHandlerRegistry = llvm::Registry<PragmaHandler>;
30603061

30613062
} // namespace clang
30623063

3064+
namespace llvm {
3065+
extern template class CLANG_TEMPLATE_ABI Registry<clang::PragmaHandler>;
3066+
} // namespace llvm
3067+
30633068
#endif // LLVM_CLANG_LEX_PREPROCESSOR_H

clang/include/clang/Tooling/CompilationDatabasePluginRegistry.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#ifndef LLVM_CLANG_TOOLING_COMPILATIONDATABASEPLUGINREGISTRY_H
1010
#define LLVM_CLANG_TOOLING_COMPILATIONDATABASEPLUGINREGISTRY_H
1111

12+
#include "clang/Support/Compiler.h"
1213
#include "clang/Tooling/CompilationDatabase.h"
1314
#include "llvm/Support/Registry.h"
1415

@@ -42,4 +43,9 @@ using CompilationDatabasePluginRegistry =
4243
} // namespace tooling
4344
} // namespace clang
4445

46+
namespace llvm {
47+
extern template class CLANG_TEMPLATE_ABI
48+
Registry<clang::tooling::CompilationDatabasePlugin>;
49+
} // namespace llvm
50+
4551
#endif // LLVM_CLANG_TOOLING_COMPILATIONDATABASEPLUGINREGISTRY_H

clang/include/clang/Tooling/ToolExecutorPluginRegistry.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#ifndef LLVM_CLANG_TOOLING_TOOLEXECUTORPLUGINREGISTRY_H
1010
#define LLVM_CLANG_TOOLING_TOOLEXECUTORPLUGINREGISTRY_H
1111

12+
#include "clang/Support/Compiler.h"
1213
#include "clang/Tooling/Execution.h"
1314
#include "llvm/Support/Registry.h"
1415

@@ -20,4 +21,9 @@ using ToolExecutorPluginRegistry = llvm::Registry<ToolExecutorPlugin>;
2021
} // namespace tooling
2122
} // namespace clang
2223

24+
namespace llvm {
25+
extern template class CLANG_TEMPLATE_ABI
26+
Registry<clang::tooling::ToolExecutorPlugin>;
27+
} // namespace llvm
28+
2329
#endif // LLVM_CLANG_TOOLING_TOOLEXECUTORPLUGINREGISTRY_H

0 commit comments

Comments
 (0)