clang-tools 10.0.0

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/Config/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 CERTModule.
19 extern volatile int CERTModuleAnchorSource;
20 static int LLVM_ATTRIBUTE_UNUSED CERTModuleAnchorDestination =
21 CERTModuleAnchorSource;
22
23 // This anchor is used to force the linker to link the AbseilModule.
24 extern volatile int AbseilModuleAnchorSource;
25 static int LLVM_ATTRIBUTE_UNUSED AbseilModuleAnchorDestination =
26 AbseilModuleAnchorSource;
27
28 // This anchor is used to force the linker to link the BoostModule.
29 extern volatile int BoostModuleAnchorSource;
30 static int LLVM_ATTRIBUTE_UNUSED BoostModuleAnchorDestination =
31 BoostModuleAnchorSource;
32
33 // This anchor is used to force the linker to link the BugproneModule.
34 extern volatile int BugproneModuleAnchorSource;
35 static int LLVM_ATTRIBUTE_UNUSED BugproneModuleAnchorDestination =
36 BugproneModuleAnchorSource;
37
38 // This anchor is used to force the linker to link the LinuxKernelModule.
39 extern volatile int LinuxKernelModuleAnchorSource;
40 static int LLVM_ATTRIBUTE_UNUSED LinuxKernelModuleAnchorDestination =
41 LinuxKernelModuleAnchorSource;
42
43 // This anchor is used to force the linker to link the LLVMModule.
44 extern volatile int LLVMModuleAnchorSource;
45 static int LLVM_ATTRIBUTE_UNUSED LLVMModuleAnchorDestination =
46 LLVMModuleAnchorSource;
47
48 // This anchor is used to force the linker to link the CppCoreGuidelinesModule.
49 extern volatile int CppCoreGuidelinesModuleAnchorSource;
50 static int LLVM_ATTRIBUTE_UNUSED CppCoreGuidelinesModuleAnchorDestination =
51 CppCoreGuidelinesModuleAnchorSource;
52
53 // This anchor is used to force the linker to link the DarwinModule.
54 extern volatile int DarwinModuleAnchorSource;
55 static int LLVM_ATTRIBUTE_UNUSED DarwinModuleAnchorDestination =
56 DarwinModuleAnchorSource;
57
58 // This anchor is used to force the linker to link the FuchsiaModule.
59 extern volatile int FuchsiaModuleAnchorSource;
60 static int LLVM_ATTRIBUTE_UNUSED FuchsiaModuleAnchorDestination =
61 FuchsiaModuleAnchorSource;
62
63 // This anchor is used to force the linker to link the GoogleModule.
64 extern volatile int GoogleModuleAnchorSource;
65 static int LLVM_ATTRIBUTE_UNUSED GoogleModuleAnchorDestination =
66 GoogleModuleAnchorSource;
67
68 // This anchor is used to force the linker to link the AndroidModule.
69 extern volatile int AndroidModuleAnchorSource;
70 static int LLVM_ATTRIBUTE_UNUSED AndroidModuleAnchorDestination =
71 AndroidModuleAnchorSource;
72
73 // This anchor is used to force the linker to link the MiscModule.
74 extern volatile int MiscModuleAnchorSource;
75 static int LLVM_ATTRIBUTE_UNUSED MiscModuleAnchorDestination =
76 MiscModuleAnchorSource;
77
78 // This anchor is used to force the linker to link the ModernizeModule.
79 extern volatile int ModernizeModuleAnchorSource;
80 static int LLVM_ATTRIBUTE_UNUSED ModernizeModuleAnchorDestination =
81 ModernizeModuleAnchorSource;
82
83 #if CLANG_ENABLE_STATIC_ANALYZER && \
84 !defined(CLANG_TIDY_DISABLE_STATIC_ANALYZER_CHECKS)
85 // This anchor is used to force the linker to link the MPIModule.
86 extern volatile int MPIModuleAnchorSource;
87 static int LLVM_ATTRIBUTE_UNUSED MPIModuleAnchorDestination =
88 MPIModuleAnchorSource;
89 #endif
90
91 // This anchor is used to force the linker to link the OpenMPModule.
92 extern volatile int OpenMPModuleAnchorSource;
93 static int LLVM_ATTRIBUTE_UNUSED OpenMPModuleAnchorDestination =
94 OpenMPModuleAnchorSource;
95
96 // This anchor is used to force the linker to link the PerformanceModule.
97 extern volatile int PerformanceModuleAnchorSource;
98 static int LLVM_ATTRIBUTE_UNUSED PerformanceModuleAnchorDestination =
99 PerformanceModuleAnchorSource;
100
101 // This anchor is used to force the linker to link the PortabilityModule.
102 extern volatile int PortabilityModuleAnchorSource;
103 static int LLVM_ATTRIBUTE_UNUSED PortabilityModuleAnchorDestination =
104 PortabilityModuleAnchorSource;
105
106 // This anchor is used to force the linker to link the ReadabilityModule.
107 extern volatile int ReadabilityModuleAnchorSource;
108 static int LLVM_ATTRIBUTE_UNUSED ReadabilityModuleAnchorDestination =
109 ReadabilityModuleAnchorSource;
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 =
114 ObjCModuleAnchorSource;
115
116 // This anchor is used to force the linker to link the HICPPModule.
117 extern volatile int HICPPModuleAnchorSource;
118 static int LLVM_ATTRIBUTE_UNUSED HICPPModuleAnchorDestination =
119 HICPPModuleAnchorSource;
120
121 // This anchor is used to force the linker to link the ZirconModule.
122 extern volatile int ZirconModuleAnchorSource;
123 static int LLVM_ATTRIBUTE_UNUSED ZirconModuleAnchorDestination =
124 ZirconModuleAnchorSource;
125
126 } // namespace tidy
127 } // namespace clang
128
129 #endif
clang::tidy::GoogleModuleAnchorSource
volatile int GoogleModuleAnchorSource
Definition: GoogleTidyModule.cpp:107
clang::tidy::LinuxKernelModuleAnchorSource
volatile int LinuxKernelModuleAnchorSource
Definition: LinuxKernelTidyModule.cpp:34
clang::tidy::LinuxKernelModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED LinuxKernelModuleAnchorDestination
Definition: ClangTidyForceLinker.h:40
clang::tidy::ReadabilityModuleAnchorSource
volatile int ReadabilityModuleAnchorSource
Definition: ReadabilityTidyModule.cpp:139
clang::tidy::DarwinModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED DarwinModuleAnchorDestination
Definition: ClangTidyForceLinker.h:55
clang::tidy::LLVMModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED LLVMModuleAnchorDestination
Definition: ClangTidyForceLinker.h:45
clang::tidy::AndroidModuleAnchorSource
volatile int AndroidModuleAnchorSource
Definition: AndroidTidyModule.cpp:70
clang::tidy::LLVMModuleAnchorSource
volatile int LLVMModuleAnchorSource
Definition: LLVMTidyModule.cpp:49
clang::tidy::PerformanceModuleAnchorSource
volatile int PerformanceModuleAnchorSource
Definition: PerformanceTidyModule.cpp:73
clang::tidy::CppCoreGuidelinesModuleAnchorSource
volatile int CppCoreGuidelinesModuleAnchorSource
Definition: CppCoreGuidelinesTidyModule.cpp:115
clang::tidy::ObjCModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED ObjCModuleAnchorDestination
Definition: ClangTidyForceLinker.h:113
clang::tidy::ReadabilityModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED ReadabilityModuleAnchorDestination
Definition: ClangTidyForceLinker.h:108
clang::tidy::BugproneModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED BugproneModuleAnchorDestination
Definition: ClangTidyForceLinker.h:35
clang::tidy::MPIModuleAnchorSource
volatile int MPIModuleAnchorSource
Definition: MPITidyModule.cpp:35
clang::tidy::HICPPModuleAnchorSource
volatile int HICPPModuleAnchorSource
Definition: HICPPTidyModule.cpp:121
clang::tidy::ZirconModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED ZirconModuleAnchorDestination
Definition: ClangTidyForceLinker.h:123
clang::tidy::AndroidModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED AndroidModuleAnchorDestination
Definition: ClangTidyForceLinker.h:70
clang::tidy::OpenMPModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED OpenMPModuleAnchorDestination
Definition: ClangTidyForceLinker.h:93
clang::tidy::PortabilityModuleAnchorSource
volatile int PortabilityModuleAnchorSource
Definition: PortabilityTidyModule.cpp:34
clang::tidy::ZirconModuleAnchorSource
volatile int ZirconModuleAnchorSource
Definition: ZirconTidyModule.cpp:36
clang::tidy::CERTModuleAnchorSource
volatile int CERTModuleAnchorSource
Definition: CERTTidyModule.cpp:116
clang::tidy::OpenMPModuleAnchorSource
volatile int OpenMPModuleAnchorSource
Definition: OpenMPTidyModule.cpp:38
clang::tidy::GoogleModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED GoogleModuleAnchorDestination
Definition: ClangTidyForceLinker.h:65
clang::tidy::HICPPModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED HICPPModuleAnchorDestination
Definition: ClangTidyForceLinker.h:118
clang::tidy::BoostModuleAnchorSource
volatile int BoostModuleAnchorSource
Definition: BoostTidyModule.cpp:34
clang::tidy::DarwinModuleAnchorSource
volatile int DarwinModuleAnchorSource
Definition: DarwinTidyModule.cpp:37
clang::tidy::ObjCModuleAnchorSource
volatile int ObjCModuleAnchorSource
Definition: ObjCTidyModule.cpp:49
clang::tidy::MiscModuleAnchorSource
volatile int MiscModuleAnchorSource
Definition: MiscTidyModule.cpp:68
clang::tidy::PerformanceModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED PerformanceModuleAnchorDestination
Definition: ClangTidyForceLinker.h:98
clang::tidy::BugproneModuleAnchorSource
volatile int BugproneModuleAnchorSource
Definition: BugproneTidyModule.cpp:178
clang::tidy::FuchsiaModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED FuchsiaModuleAnchorDestination
Definition: ClangTidyForceLinker.h:60
clang::tidy::MiscModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED MiscModuleAnchorDestination
Definition: ClangTidyForceLinker.h:75
clang::tidy::CppCoreGuidelinesModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED CppCoreGuidelinesModuleAnchorDestination
Definition: ClangTidyForceLinker.h:50
clang
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
Definition: ApplyReplacements.h:27
clang::tidy::ModernizeModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED ModernizeModuleAnchorDestination
Definition: ClangTidyForceLinker.h:80
clang::tidy::AbseilModuleAnchorSource
volatile int AbseilModuleAnchorSource
Definition: AbseilTidyModule.cpp:81
clang::tidy::ModernizeModuleAnchorSource
volatile int ModernizeModuleAnchorSource
Definition: ModernizeTidyModule.cpp:126
clang::tidy::PortabilityModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED PortabilityModuleAnchorDestination
Definition: ClangTidyForceLinker.h:103
clang::tidy::CERTModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED CERTModuleAnchorDestination
Definition: ClangTidyForceLinker.h:20
clang::tidy::BoostModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED BoostModuleAnchorDestination
Definition: ClangTidyForceLinker.h:30
clang::tidy::FuchsiaModuleAnchorSource
volatile int FuchsiaModuleAnchorSource
Definition: FuchsiaTidyModule.cpp:59
clang::tidy::AbseilModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED AbseilModuleAnchorDestination
Definition: ClangTidyForceLinker.h:25