clang-tools  14.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 
15 namespace clang {
16 namespace tidy {
17 
18 // This anchor is used to force the linker to link the AbseilModule.
19 extern volatile int AbseilModuleAnchorSource;
20 static int LLVM_ATTRIBUTE_UNUSED AbseilModuleAnchorDestination =
22 
23 // This anchor is used to force the linker to link the AlteraModule.
24 extern volatile int AlteraModuleAnchorSource;
25 static int LLVM_ATTRIBUTE_UNUSED AlteraModuleAnchorDestination =
27 
28 // This anchor is used to force the linker to link the AndroidModule.
29 extern volatile int AndroidModuleAnchorSource;
30 static int LLVM_ATTRIBUTE_UNUSED AndroidModuleAnchorDestination =
32 
33 // This anchor is used to force the linker to link the BoostModule.
34 extern volatile int BoostModuleAnchorSource;
35 static int LLVM_ATTRIBUTE_UNUSED BoostModuleAnchorDestination =
37 
38 // This anchor is used to force the linker to link the BugproneModule.
39 extern volatile int BugproneModuleAnchorSource;
40 static int LLVM_ATTRIBUTE_UNUSED BugproneModuleAnchorDestination =
42 
43 // This anchor is used to force the linker to link the CERTModule.
44 extern volatile int CERTModuleAnchorSource;
45 static int LLVM_ATTRIBUTE_UNUSED CERTModuleAnchorDestination =
47 
48 // This anchor is used to force the linker to link the ConcurrencyModule.
49 extern volatile int ConcurrencyModuleAnchorSource;
50 static int LLVM_ATTRIBUTE_UNUSED ConcurrencyModuleAnchorDestination =
52 
53 // This anchor is used to force the linker to link the CppCoreGuidelinesModule.
54 extern volatile int CppCoreGuidelinesModuleAnchorSource;
55 static int LLVM_ATTRIBUTE_UNUSED CppCoreGuidelinesModuleAnchorDestination =
57 
58 // This anchor is used to force the linker to link the DarwinModule.
59 extern volatile int DarwinModuleAnchorSource;
60 static int LLVM_ATTRIBUTE_UNUSED DarwinModuleAnchorDestination =
62 
63 // This anchor is used to force the linker to link the FuchsiaModule.
64 extern volatile int FuchsiaModuleAnchorSource;
65 static int LLVM_ATTRIBUTE_UNUSED FuchsiaModuleAnchorDestination =
67 
68 // This anchor is used to force the linker to link the GoogleModule.
69 extern volatile int GoogleModuleAnchorSource;
70 static int LLVM_ATTRIBUTE_UNUSED GoogleModuleAnchorDestination =
72 
73 // This anchor is used to force the linker to link the HICPPModule.
74 extern volatile int HICPPModuleAnchorSource;
75 static int LLVM_ATTRIBUTE_UNUSED HICPPModuleAnchorDestination =
77 
78 // This anchor is used to force the linker to link the LinuxKernelModule.
79 extern volatile int LinuxKernelModuleAnchorSource;
80 static int LLVM_ATTRIBUTE_UNUSED LinuxKernelModuleAnchorDestination =
82 
83 // This anchor is used to force the linker to link the LLVMModule.
84 extern volatile int LLVMModuleAnchorSource;
85 static int LLVM_ATTRIBUTE_UNUSED LLVMModuleAnchorDestination =
87 
88 // This anchor is used to force the linker to link the LLVMLibcModule.
89 extern volatile int LLVMLibcModuleAnchorSource;
90 static int LLVM_ATTRIBUTE_UNUSED LLVMLibcModuleAnchorDestination =
92 
93 // This anchor is used to force the linker to link the MiscModule.
94 extern volatile int MiscModuleAnchorSource;
95 static int LLVM_ATTRIBUTE_UNUSED MiscModuleAnchorDestination =
97 
98 // This anchor is used to force the linker to link the ModernizeModule.
99 extern volatile int ModernizeModuleAnchorSource;
100 static int LLVM_ATTRIBUTE_UNUSED ModernizeModuleAnchorDestination =
102 
103 #if CLANG_TIDY_ENABLE_STATIC_ANALYZER && \
104  !defined(CLANG_TIDY_DISABLE_STATIC_ANALYZER_CHECKS)
105 // This anchor is used to force the linker to link the MPIModule.
106 extern volatile int MPIModuleAnchorSource;
107 static int LLVM_ATTRIBUTE_UNUSED MPIModuleAnchorDestination =
109 #endif
110 
111 // This anchor is used to force the linker to link the ObjCModule.
112 extern volatile int ObjCModuleAnchorSource;
113 static int LLVM_ATTRIBUTE_UNUSED ObjCModuleAnchorDestination =
115 
116 // This anchor is used to force the linker to link the OpenMPModule.
117 extern volatile int OpenMPModuleAnchorSource;
118 static int LLVM_ATTRIBUTE_UNUSED OpenMPModuleAnchorDestination =
120 
121 // This anchor is used to force the linker to link the PerformanceModule.
122 extern volatile int PerformanceModuleAnchorSource;
123 static int LLVM_ATTRIBUTE_UNUSED PerformanceModuleAnchorDestination =
125 
126 // This anchor is used to force the linker to link the PortabilityModule.
127 extern volatile int PortabilityModuleAnchorSource;
128 static int LLVM_ATTRIBUTE_UNUSED PortabilityModuleAnchorDestination =
130 
131 // This anchor is used to force the linker to link the ReadabilityModule.
132 extern volatile int ReadabilityModuleAnchorSource;
133 static int LLVM_ATTRIBUTE_UNUSED ReadabilityModuleAnchorDestination =
135 
136 // This anchor is used to force the linker to link the ZirconModule.
137 extern volatile int ZirconModuleAnchorSource;
138 static int LLVM_ATTRIBUTE_UNUSED ZirconModuleAnchorDestination =
140 
141 } // namespace tidy
142 } // namespace clang
143 
144 #endif
clang::tidy::AlteraModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED AlteraModuleAnchorDestination
Definition: ClangTidyForceLinker.h:25
clang::tidy::BoostModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED BoostModuleAnchorDestination
Definition: ClangTidyForceLinker.h:35
clang::tidy::ReadabilityModuleAnchorSource
volatile int ReadabilityModuleAnchorSource
Definition: ReadabilityTidyModule.cpp:151
clang::tidy::LLVMModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED LLVMModuleAnchorDestination
Definition: ClangTidyForceLinker.h:85
clang::tidy::ConcurrencyModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED ConcurrencyModuleAnchorDestination
Definition: ClangTidyForceLinker.h:50
clang::tidy::LinuxKernelModuleAnchorSource
volatile int LinuxKernelModuleAnchorSource
Definition: LinuxKernelTidyModule.cpp:34
clang::tidy::AbseilModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED AbseilModuleAnchorDestination
Definition: ClangTidyForceLinker.h:20
clang::tidy::FuchsiaModuleAnchorSource
volatile int FuchsiaModuleAnchorSource
Definition: FuchsiaTidyModule.cpp:56
clang::tidy::PerformanceModuleAnchorSource
volatile int PerformanceModuleAnchorSource
Definition: PerformanceTidyModule.cpp:75
clang::tidy::LLVMLibcModuleAnchorSource
volatile int LLVMLibcModuleAnchorSource
Definition: LLVMLibcTidyModule.cpp:40
clang::tidy::HICPPModuleAnchorSource
volatile int HICPPModuleAnchorSource
Definition: HICPPTidyModule.cpp:121
clang::tidy::DarwinModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED DarwinModuleAnchorDestination
Definition: ClangTidyForceLinker.h:60
clang::tidy::PortabilityModuleAnchorSource
volatile int PortabilityModuleAnchorSource
Definition: PortabilityTidyModule.cpp:37
clang::tidy::ReadabilityModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED ReadabilityModuleAnchorDestination
Definition: ClangTidyForceLinker.h:133
clang::tidy::GoogleModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED GoogleModuleAnchorDestination
Definition: ClangTidyForceLinker.h:70
clang::tidy::AlteraModuleAnchorSource
volatile int AlteraModuleAnchorSource
Definition: AlteraTidyModule.cpp:47
clang::tidy::ZirconModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED ZirconModuleAnchorDestination
Definition: ClangTidyForceLinker.h:138
clang::tidy::MPIModuleAnchorSource
volatile int MPIModuleAnchorSource
Definition: MPITidyModule.cpp:35
clang::tidy::LLVMLibcModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED LLVMLibcModuleAnchorDestination
Definition: ClangTidyForceLinker.h:90
clang::tidy::AndroidModuleAnchorSource
volatile int AndroidModuleAnchorSource
Definition: AndroidTidyModule.cpp:70
clang::tidy::ZirconModuleAnchorSource
volatile int ZirconModuleAnchorSource
Definition: ZirconTidyModule.cpp:36
clang::tidy::AndroidModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED AndroidModuleAnchorDestination
Definition: ClangTidyForceLinker.h:30
clang::tidy::OpenMPModuleAnchorSource
volatile int OpenMPModuleAnchorSource
Definition: OpenMPTidyModule.cpp:38
clang::tidy::MiscModuleAnchorSource
volatile int MiscModuleAnchorSource
Definition: MiscTidyModule.cpp:70
clang::tidy::LLVMModuleAnchorSource
volatile int LLVMModuleAnchorSource
Definition: LLVMTidyModule.cpp:61
clang::tidy::OpenMPModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED OpenMPModuleAnchorDestination
Definition: ClangTidyForceLinker.h:118
clang::tidy::PerformanceModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED PerformanceModuleAnchorDestination
Definition: ClangTidyForceLinker.h:123
clang::tidy::ConcurrencyModuleAnchorSource
volatile int ConcurrencyModuleAnchorSource
Definition: ConcurrencyTidyModule.cpp:37
clang::tidy::CppCoreGuidelinesModuleAnchorSource
volatile int CppCoreGuidelinesModuleAnchorSource
Definition: CppCoreGuidelinesTidyModule.cpp:121
clang::tidy::MiscModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED MiscModuleAnchorDestination
Definition: ClangTidyForceLinker.h:95
clang::tidy::ObjCModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED ObjCModuleAnchorDestination
Definition: ClangTidyForceLinker.h:113
clang::tidy::ModernizeModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED ModernizeModuleAnchorDestination
Definition: ClangTidyForceLinker.h:100
clang::tidy::BugproneModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED BugproneModuleAnchorDestination
Definition: ClangTidyForceLinker.h:40
clang::tidy::HICPPModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED HICPPModuleAnchorDestination
Definition: ClangTidyForceLinker.h:75
clang::tidy::CERTModuleAnchorSource
volatile int CERTModuleAnchorSource
Definition: CERTTidyModule.cpp:149
clang::tidy::CERTModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED CERTModuleAnchorDestination
Definition: ClangTidyForceLinker.h:45
clang::tidy::PortabilityModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED PortabilityModuleAnchorDestination
Definition: ClangTidyForceLinker.h:128
clang::tidy::FuchsiaModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED FuchsiaModuleAnchorDestination
Definition: ClangTidyForceLinker.h:65
clang::tidy::BoostModuleAnchorSource
volatile int BoostModuleAnchorSource
Definition: BoostTidyModule.cpp:34
clang::tidy::DarwinModuleAnchorSource
volatile int DarwinModuleAnchorSource
Definition: DarwinTidyModule.cpp:37
clang
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Definition: ApplyReplacements.h:27
clang::tidy::ObjCModuleAnchorSource
volatile int ObjCModuleAnchorSource
Definition: ObjCTidyModule.cpp:55
clang::tidy::BugproneModuleAnchorSource
volatile int BugproneModuleAnchorSource
Definition: BugproneTidyModule.cpp:209
clang::tidy::CppCoreGuidelinesModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED CppCoreGuidelinesModuleAnchorDestination
Definition: ClangTidyForceLinker.h:55
clang::tidy::ModernizeModuleAnchorSource
volatile int ModernizeModuleAnchorSource
Definition: ModernizeTidyModule.cpp:129
clang::tidy::LinuxKernelModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED LinuxKernelModuleAnchorDestination
Definition: ClangTidyForceLinker.h:80
clang::tidy::AbseilModuleAnchorSource
volatile int AbseilModuleAnchorSource
Definition: AbseilTidyModule.cpp:84
clang::tidy::GoogleModuleAnchorSource
volatile int GoogleModuleAnchorSource
Definition: GoogleTidyModule.cpp:104