clang-tools 22.0.0git
ClangTidyForceLinker.h
Go to the documentation of this file.
1//===----------------------------------------------------------------------===//
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
14namespace clang::tidy {
15
16// This anchor is used to force the linker to link the AbseilModule.
17extern volatile int AbseilModuleAnchorSource;
18[[maybe_unused]] static int AbseilModuleAnchorDestination =
20
21// This anchor is used to force the linker to link the AlteraModule.
22extern volatile int AlteraModuleAnchorSource;
23[[maybe_unused]] static int AlteraModuleAnchorDestination =
25
26// This anchor is used to force the linker to link the AndroidModule.
27extern volatile int AndroidModuleAnchorSource;
28[[maybe_unused]] static int AndroidModuleAnchorDestination =
30
31// This anchor is used to force the linker to link the BoostModule.
32extern volatile int BoostModuleAnchorSource;
33[[maybe_unused]] static int BoostModuleAnchorDestination =
35
36// This anchor is used to force the linker to link the BugproneModule.
37extern volatile int BugproneModuleAnchorSource;
38[[maybe_unused]] static int BugproneModuleAnchorDestination =
40
41// This anchor is used to force the linker to link the CERTModule.
42extern volatile int CERTModuleAnchorSource;
43[[maybe_unused]] static int CERTModuleAnchorDestination =
45
46// This anchor is used to force the linker to link the ConcurrencyModule.
47extern volatile int ConcurrencyModuleAnchorSource;
48[[maybe_unused]] static int ConcurrencyModuleAnchorDestination =
50
51// This anchor is used to force the linker to link the CppCoreGuidelinesModule.
52extern volatile int CppCoreGuidelinesModuleAnchorSource;
53[[maybe_unused]] static int CppCoreGuidelinesModuleAnchorDestination =
55
56#if CLANG_TIDY_ENABLE_QUERY_BASED_CUSTOM_CHECKS
57// This anchor is used to force the linker to link the CustomModule.
58extern volatile int CustomModuleAnchorSource;
59[[maybe_unused]] static int CustomModuleAnchorDestination =
61#endif
62
63// This anchor is used to force the linker to link the DarwinModule.
64extern volatile int DarwinModuleAnchorSource;
65[[maybe_unused]] static int DarwinModuleAnchorDestination =
67
68// This anchor is used to force the linker to link the FuchsiaModule.
69extern volatile int FuchsiaModuleAnchorSource;
70[[maybe_unused]] static int FuchsiaModuleAnchorDestination =
72
73// This anchor is used to force the linker to link the GoogleModule.
74extern volatile int GoogleModuleAnchorSource;
75[[maybe_unused]] static int GoogleModuleAnchorDestination =
77
78// This anchor is used to force the linker to link the HICPPModule.
79extern volatile int HICPPModuleAnchorSource;
80[[maybe_unused]] static int HICPPModuleAnchorDestination =
82
83// This anchor is used to force the linker to link the LinuxKernelModule.
84extern volatile int LinuxKernelModuleAnchorSource;
85[[maybe_unused]] static int LinuxKernelModuleAnchorDestination =
87
88// This anchor is used to force the linker to link the LLVMModule.
89extern volatile int LLVMModuleAnchorSource;
90[[maybe_unused]] static int LLVMModuleAnchorDestination =
92
93// This anchor is used to force the linker to link the LLVMLibcModule.
94extern volatile int LLVMLibcModuleAnchorSource;
95[[maybe_unused]] static int LLVMLibcModuleAnchorDestination =
97
98// This anchor is used to force the linker to link the MiscModule.
99extern volatile int MiscModuleAnchorSource;
100[[maybe_unused]] static int MiscModuleAnchorDestination =
102
103// This anchor is used to force the linker to link the ModernizeModule.
104extern volatile int ModernizeModuleAnchorSource;
105[[maybe_unused]] static int ModernizeModuleAnchorDestination =
107
108#if CLANG_TIDY_ENABLE_STATIC_ANALYZER && \
109 !defined(CLANG_TIDY_DISABLE_STATIC_ANALYZER_CHECKS)
110// This anchor is used to force the linker to link the MPIModule.
111extern volatile int MPIModuleAnchorSource;
112[[maybe_unused]] static int MPIModuleAnchorDestination = MPIModuleAnchorSource;
113#endif
114
115// This anchor is used to force the linker to link the ObjCModule.
116extern volatile int ObjCModuleAnchorSource;
117[[maybe_unused]] static int ObjCModuleAnchorDestination =
119
120// This anchor is used to force the linker to link the OpenMPModule.
121extern volatile int OpenMPModuleAnchorSource;
122[[maybe_unused]] static int OpenMPModuleAnchorDestination =
124
125// This anchor is used to force the linker to link the PerformanceModule.
126extern volatile int PerformanceModuleAnchorSource;
127[[maybe_unused]] static int PerformanceModuleAnchorDestination =
129
130// This anchor is used to force the linker to link the PortabilityModule.
131extern volatile int PortabilityModuleAnchorSource;
132[[maybe_unused]] static int PortabilityModuleAnchorDestination =
134
135// This anchor is used to force the linker to link the ReadabilityModule.
136extern volatile int ReadabilityModuleAnchorSource;
137[[maybe_unused]] static int ReadabilityModuleAnchorDestination =
139
140// This anchor is used to force the linker to link the ZirconModule.
141extern volatile int ZirconModuleAnchorSource;
142[[maybe_unused]] static int ZirconModuleAnchorDestination =
144
145} // namespace clang::tidy
146
147#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