clang-tools 19.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;
19static int LLVM_ATTRIBUTE_UNUSED AbseilModuleAnchorDestination =
21
22// This anchor is used to force the linker to link the AlteraModule.
23extern volatile int AlteraModuleAnchorSource;
24static int LLVM_ATTRIBUTE_UNUSED AlteraModuleAnchorDestination =
26
27// This anchor is used to force the linker to link the AndroidModule.
28extern volatile int AndroidModuleAnchorSource;
29static int LLVM_ATTRIBUTE_UNUSED AndroidModuleAnchorDestination =
31
32// This anchor is used to force the linker to link the BoostModule.
33extern volatile int BoostModuleAnchorSource;
34static int LLVM_ATTRIBUTE_UNUSED BoostModuleAnchorDestination =
36
37// This anchor is used to force the linker to link the BugproneModule.
38extern volatile int BugproneModuleAnchorSource;
39static int LLVM_ATTRIBUTE_UNUSED BugproneModuleAnchorDestination =
41
42// This anchor is used to force the linker to link the CERTModule.
43extern volatile int CERTModuleAnchorSource;
44static int LLVM_ATTRIBUTE_UNUSED CERTModuleAnchorDestination =
46
47// This anchor is used to force the linker to link the ConcurrencyModule.
48extern volatile int ConcurrencyModuleAnchorSource;
49static int LLVM_ATTRIBUTE_UNUSED ConcurrencyModuleAnchorDestination =
51
52// This anchor is used to force the linker to link the CppCoreGuidelinesModule.
53extern volatile int CppCoreGuidelinesModuleAnchorSource;
54static int LLVM_ATTRIBUTE_UNUSED CppCoreGuidelinesModuleAnchorDestination =
56
57// This anchor is used to force the linker to link the DarwinModule.
58extern volatile int DarwinModuleAnchorSource;
59static int LLVM_ATTRIBUTE_UNUSED DarwinModuleAnchorDestination =
61
62// This anchor is used to force the linker to link the FuchsiaModule.
63extern volatile int FuchsiaModuleAnchorSource;
64static int LLVM_ATTRIBUTE_UNUSED FuchsiaModuleAnchorDestination =
66
67// This anchor is used to force the linker to link the GoogleModule.
68extern volatile int GoogleModuleAnchorSource;
69static int LLVM_ATTRIBUTE_UNUSED GoogleModuleAnchorDestination =
71
72// This anchor is used to force the linker to link the HICPPModule.
73extern volatile int HICPPModuleAnchorSource;
74static int LLVM_ATTRIBUTE_UNUSED HICPPModuleAnchorDestination =
76
77// This anchor is used to force the linker to link the LinuxKernelModule.
78extern volatile int LinuxKernelModuleAnchorSource;
79static int LLVM_ATTRIBUTE_UNUSED LinuxKernelModuleAnchorDestination =
81
82// This anchor is used to force the linker to link the LLVMModule.
83extern volatile int LLVMModuleAnchorSource;
84static int LLVM_ATTRIBUTE_UNUSED LLVMModuleAnchorDestination =
86
87// This anchor is used to force the linker to link the LLVMLibcModule.
88extern volatile int LLVMLibcModuleAnchorSource;
89static int LLVM_ATTRIBUTE_UNUSED LLVMLibcModuleAnchorDestination =
91
92// This anchor is used to force the linker to link the MiscModule.
93extern volatile int MiscModuleAnchorSource;
94static int LLVM_ATTRIBUTE_UNUSED MiscModuleAnchorDestination =
96
97// This anchor is used to force the linker to link the ModernizeModule.
98extern volatile int ModernizeModuleAnchorSource;
99static int LLVM_ATTRIBUTE_UNUSED ModernizeModuleAnchorDestination =
101
102#if CLANG_TIDY_ENABLE_STATIC_ANALYZER && \
103 !defined(CLANG_TIDY_DISABLE_STATIC_ANALYZER_CHECKS)
104// This anchor is used to force the linker to link the MPIModule.
105extern volatile int MPIModuleAnchorSource;
106static int LLVM_ATTRIBUTE_UNUSED MPIModuleAnchorDestination =
108#endif
109
110// This anchor is used to force the linker to link the ObjCModule.
111extern volatile int ObjCModuleAnchorSource;
112static int LLVM_ATTRIBUTE_UNUSED ObjCModuleAnchorDestination =
114
115// This anchor is used to force the linker to link the OpenMPModule.
116extern volatile int OpenMPModuleAnchorSource;
117static int LLVM_ATTRIBUTE_UNUSED OpenMPModuleAnchorDestination =
119
120// This anchor is used to force the linker to link the PerformanceModule.
121extern volatile int PerformanceModuleAnchorSource;
122static int LLVM_ATTRIBUTE_UNUSED PerformanceModuleAnchorDestination =
124
125// This anchor is used to force the linker to link the PortabilityModule.
126extern volatile int PortabilityModuleAnchorSource;
127static int LLVM_ATTRIBUTE_UNUSED PortabilityModuleAnchorDestination =
129
130// This anchor is used to force the linker to link the ReadabilityModule.
131extern volatile int ReadabilityModuleAnchorSource;
132static int LLVM_ATTRIBUTE_UNUSED ReadabilityModuleAnchorDestination =
134
135// This anchor is used to force the linker to link the ZirconModule.
136extern volatile int ZirconModuleAnchorSource;
137static int LLVM_ATTRIBUTE_UNUSED ZirconModuleAnchorDestination =
139
140} // namespace clang::tidy
141
142#endif
static int LLVM_ATTRIBUTE_UNUSED HICPPModuleAnchorDestination
volatile int MPIModuleAnchorSource
static int LLVM_ATTRIBUTE_UNUSED MiscModuleAnchorDestination
volatile int AlteraModuleAnchorSource
static int LLVM_ATTRIBUTE_UNUSED DarwinModuleAnchorDestination
volatile int DarwinModuleAnchorSource
volatile int LLVMLibcModuleAnchorSource
volatile int AndroidModuleAnchorSource
volatile int ConcurrencyModuleAnchorSource
volatile int HICPPModuleAnchorSource
static int LLVM_ATTRIBUTE_UNUSED ReadabilityModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED PortabilityModuleAnchorDestination
volatile int ZirconModuleAnchorSource
volatile int OpenMPModuleAnchorSource
static int LLVM_ATTRIBUTE_UNUSED GoogleModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED PerformanceModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED LLVMLibcModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED CppCoreGuidelinesModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED LLVMModuleAnchorDestination
volatile int AbseilModuleAnchorSource
static int LLVM_ATTRIBUTE_UNUSED ObjCModuleAnchorDestination
volatile int CERTModuleAnchorSource
volatile int PortabilityModuleAnchorSource
static int LLVM_ATTRIBUTE_UNUSED FuchsiaModuleAnchorDestination
volatile int ReadabilityModuleAnchorSource
volatile int ObjCModuleAnchorSource
volatile int CppCoreGuidelinesModuleAnchorSource
static int LLVM_ATTRIBUTE_UNUSED ZirconModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED ConcurrencyModuleAnchorDestination
volatile int LLVMModuleAnchorSource
volatile int LinuxKernelModuleAnchorSource
volatile int BoostModuleAnchorSource
static int LLVM_ATTRIBUTE_UNUSED AndroidModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED LinuxKernelModuleAnchorDestination
volatile int ModernizeModuleAnchorSource
volatile int FuchsiaModuleAnchorSource
static int LLVM_ATTRIBUTE_UNUSED CERTModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED BugproneModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED AbseilModuleAnchorDestination
volatile int BugproneModuleAnchorSource
static int LLVM_ATTRIBUTE_UNUSED ModernizeModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED BoostModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED OpenMPModuleAnchorDestination
volatile int GoogleModuleAnchorSource
volatile int MiscModuleAnchorSource
volatile int PerformanceModuleAnchorSource
static int LLVM_ATTRIBUTE_UNUSED AlteraModuleAnchorDestination