clang-tools 22.0.0git
ClangTidyForceLinker.h
Go to the documentation of this file.
1//===- ClangTidyForceLinker.h - clang-tidy --------------------------------===//
2//
3// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4// See https://llvm.org/LICENSE.txt for license information.
5// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6//
7//===----------------------------------------------------------------------===//
8
9#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYFORCELINKER_H
10#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYFORCELINKER_H
11
12#include "clang-tidy-config.h"
13#include "llvm/Support/Compiler.h"
14
15namespace clang::tidy {
16
17// This anchor is used to force the linker to link the AbseilModule.
18extern volatile int AbseilModuleAnchorSource;
19[[maybe_unused]] static int AbseilModuleAnchorDestination =
21
22// This anchor is used to force the linker to link the AlteraModule.
23extern volatile int AlteraModuleAnchorSource;
24[[maybe_unused]] static int AlteraModuleAnchorDestination =
26
27// This anchor is used to force the linker to link the AndroidModule.
28extern volatile int AndroidModuleAnchorSource;
29[[maybe_unused]] static int AndroidModuleAnchorDestination =
31
32// This anchor is used to force the linker to link the BoostModule.
33extern volatile int BoostModuleAnchorSource;
34[[maybe_unused]] static int BoostModuleAnchorDestination =
36
37// This anchor is used to force the linker to link the BugproneModule.
38extern volatile int BugproneModuleAnchorSource;
39[[maybe_unused]] static int BugproneModuleAnchorDestination =
41
42// This anchor is used to force the linker to link the CERTModule.
43extern volatile int CERTModuleAnchorSource;
44[[maybe_unused]] static int CERTModuleAnchorDestination =
46
47// This anchor is used to force the linker to link the ConcurrencyModule.
48extern volatile int ConcurrencyModuleAnchorSource;
49[[maybe_unused]] static int ConcurrencyModuleAnchorDestination =
51
52// This anchor is used to force the linker to link the CppCoreGuidelinesModule.
53extern volatile int CppCoreGuidelinesModuleAnchorSource;
54[[maybe_unused]] static int CppCoreGuidelinesModuleAnchorDestination =
56
57#if CLANG_TIDY_ENABLE_QUERY_BASED_CUSTOM_CHECKS
58// This anchor is used to force the linker to link the CustomModule.
59extern volatile int CustomModuleAnchorSource;
60[[maybe_unused]] static int CustomModuleAnchorDestination =
62#endif
63
64// This anchor is used to force the linker to link the DarwinModule.
65extern volatile int DarwinModuleAnchorSource;
66[[maybe_unused]] static int DarwinModuleAnchorDestination =
68
69// This anchor is used to force the linker to link the FuchsiaModule.
70extern volatile int FuchsiaModuleAnchorSource;
71[[maybe_unused]] static int FuchsiaModuleAnchorDestination =
73
74// This anchor is used to force the linker to link the GoogleModule.
75extern volatile int GoogleModuleAnchorSource;
76[[maybe_unused]] static int GoogleModuleAnchorDestination =
78
79// This anchor is used to force the linker to link the HICPPModule.
80extern volatile int HICPPModuleAnchorSource;
81[[maybe_unused]] static int HICPPModuleAnchorDestination =
83
84// This anchor is used to force the linker to link the LinuxKernelModule.
85extern volatile int LinuxKernelModuleAnchorSource;
86[[maybe_unused]] static int LinuxKernelModuleAnchorDestination =
88
89// This anchor is used to force the linker to link the LLVMModule.
90extern volatile int LLVMModuleAnchorSource;
91[[maybe_unused]] static int LLVMModuleAnchorDestination =
93
94// This anchor is used to force the linker to link the LLVMLibcModule.
95extern volatile int LLVMLibcModuleAnchorSource;
96[[maybe_unused]] static int LLVMLibcModuleAnchorDestination =
98
99// This anchor is used to force the linker to link the MiscModule.
100extern volatile int MiscModuleAnchorSource;
101[[maybe_unused]] static int MiscModuleAnchorDestination =
103
104// This anchor is used to force the linker to link the ModernizeModule.
105extern volatile int ModernizeModuleAnchorSource;
106[[maybe_unused]] static int ModernizeModuleAnchorDestination =
108
109#if CLANG_TIDY_ENABLE_STATIC_ANALYZER && \
110 !defined(CLANG_TIDY_DISABLE_STATIC_ANALYZER_CHECKS)
111// This anchor is used to force the linker to link the MPIModule.
112extern volatile int MPIModuleAnchorSource;
113[[maybe_unused]] static int MPIModuleAnchorDestination = MPIModuleAnchorSource;
114#endif
115
116// This anchor is used to force the linker to link the ObjCModule.
117extern volatile int ObjCModuleAnchorSource;
118[[maybe_unused]] static int ObjCModuleAnchorDestination =
120
121// This anchor is used to force the linker to link the OpenMPModule.
122extern volatile int OpenMPModuleAnchorSource;
123[[maybe_unused]] static int OpenMPModuleAnchorDestination =
125
126// This anchor is used to force the linker to link the PerformanceModule.
127extern volatile int PerformanceModuleAnchorSource;
128[[maybe_unused]] static int PerformanceModuleAnchorDestination =
130
131// This anchor is used to force the linker to link the PortabilityModule.
132extern volatile int PortabilityModuleAnchorSource;
133[[maybe_unused]] static int PortabilityModuleAnchorDestination =
135
136// This anchor is used to force the linker to link the ReadabilityModule.
137extern volatile int ReadabilityModuleAnchorSource;
138[[maybe_unused]] static int ReadabilityModuleAnchorDestination =
140
141// This anchor is used to force the linker to link the ZirconModule.
142extern volatile int ZirconModuleAnchorSource;
143[[maybe_unused]] static int ZirconModuleAnchorDestination =
145
146} // namespace clang::tidy
147
148#endif
volatile int CustomModuleAnchorSource
volatile int MPIModuleAnchorSource
static int ReadabilityModuleAnchorDestination
static int AndroidModuleAnchorDestination
volatile int AlteraModuleAnchorSource
static int MiscModuleAnchorDestination
volatile int DarwinModuleAnchorSource
static int PerformanceModuleAnchorDestination
volatile int LLVMLibcModuleAnchorSource
volatile int AndroidModuleAnchorSource
static int PortabilityModuleAnchorDestination
volatile int ConcurrencyModuleAnchorSource
volatile int HICPPModuleAnchorSource
volatile int ZirconModuleAnchorSource
volatile int OpenMPModuleAnchorSource
static int ObjCModuleAnchorDestination
static int CppCoreGuidelinesModuleAnchorDestination
static int BugproneModuleAnchorDestination
static int AbseilModuleAnchorDestination
static int OpenMPModuleAnchorDestination
static int BoostModuleAnchorDestination
volatile int AbseilModuleAnchorSource
volatile int CERTModuleAnchorSource
static int ModernizeModuleAnchorDestination
static int LinuxKernelModuleAnchorDestination
volatile int PortabilityModuleAnchorSource
static int LLVMLibcModuleAnchorDestination
static int ZirconModuleAnchorDestination
static int AlteraModuleAnchorDestination
static int HICPPModuleAnchorDestination
static int GoogleModuleAnchorDestination
volatile int ReadabilityModuleAnchorSource
volatile int ObjCModuleAnchorSource
static int CERTModuleAnchorDestination
volatile int CppCoreGuidelinesModuleAnchorSource
volatile int LLVMModuleAnchorSource
volatile int LinuxKernelModuleAnchorSource
volatile int BoostModuleAnchorSource
volatile int ModernizeModuleAnchorSource
volatile int FuchsiaModuleAnchorSource
static int DarwinModuleAnchorDestination
static int FuchsiaModuleAnchorDestination
static int ConcurrencyModuleAnchorDestination
volatile int BugproneModuleAnchorSource
static int LLVMModuleAnchorDestination
volatile int GoogleModuleAnchorSource
volatile int MiscModuleAnchorSource
volatile int PerformanceModuleAnchorSource