clang-tools  10.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/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 =
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 =
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 =
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 =
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 =
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 =
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 =
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 =
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 =
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 =
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 =
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 =
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 =
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 =
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 =
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 =
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 =
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 =
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 HICPPModule.
117 extern volatile int HICPPModuleAnchorSource;
118 static int LLVM_ATTRIBUTE_UNUSED HICPPModuleAnchorDestination =
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 =
125 
126 } // namespace tidy
127 } // namespace clang
128 
129 #endif
volatile int GoogleModuleAnchorSource
volatile int LinuxKernelModuleAnchorSource
static int LLVM_ATTRIBUTE_UNUSED LinuxKernelModuleAnchorDestination
volatile int ReadabilityModuleAnchorSource
static int LLVM_ATTRIBUTE_UNUSED DarwinModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED LLVMModuleAnchorDestination
volatile int AndroidModuleAnchorSource
volatile int LLVMModuleAnchorSource
volatile int PerformanceModuleAnchorSource
volatile int CppCoreGuidelinesModuleAnchorSource
static int LLVM_ATTRIBUTE_UNUSED ObjCModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED ReadabilityModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED BugproneModuleAnchorDestination
volatile int MPIModuleAnchorSource
volatile int HICPPModuleAnchorSource
static int LLVM_ATTRIBUTE_UNUSED ZirconModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED AndroidModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED OpenMPModuleAnchorDestination
volatile int PortabilityModuleAnchorSource
volatile int ZirconModuleAnchorSource
volatile int CERTModuleAnchorSource
volatile int OpenMPModuleAnchorSource
static int LLVM_ATTRIBUTE_UNUSED GoogleModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED HICPPModuleAnchorDestination
volatile int BoostModuleAnchorSource
volatile int DarwinModuleAnchorSource
volatile int ObjCModuleAnchorSource
volatile int MiscModuleAnchorSource
static int LLVM_ATTRIBUTE_UNUSED PerformanceModuleAnchorDestination
volatile int BugproneModuleAnchorSource
static int LLVM_ATTRIBUTE_UNUSED FuchsiaModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED MiscModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED CppCoreGuidelinesModuleAnchorDestination
===– Representation.cpp - ClangDoc Representation --------—*- C++ -*-===//
static int LLVM_ATTRIBUTE_UNUSED ModernizeModuleAnchorDestination
volatile int AbseilModuleAnchorSource
volatile int ModernizeModuleAnchorSource
static int LLVM_ATTRIBUTE_UNUSED PortabilityModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED CERTModuleAnchorDestination
static int LLVM_ATTRIBUTE_UNUSED BoostModuleAnchorDestination
volatile int FuchsiaModuleAnchorSource
static int LLVM_ATTRIBUTE_UNUSED AbseilModuleAnchorDestination