brintos

brintos / llvm-project-archived public Read only

0
0
Text · 6.0 KiB · afc358a Raw
149 lines · c
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-exception6//7//===----------------------------------------------------------------------===//8 9#ifndef LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYFORCELINKER_H10#define LLVM_CLANG_TOOLS_EXTRA_CLANG_TIDY_CLANGTIDYFORCELINKER_H11 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;19[[maybe_unused]] static int AbseilModuleAnchorDestination =20    AbseilModuleAnchorSource;21 22// This anchor is used to force the linker to link the AlteraModule.23extern volatile int AlteraModuleAnchorSource;24[[maybe_unused]] static int AlteraModuleAnchorDestination =25    AlteraModuleAnchorSource;26 27// This anchor is used to force the linker to link the AndroidModule.28extern volatile int AndroidModuleAnchorSource;29[[maybe_unused]] static int AndroidModuleAnchorDestination =30    AndroidModuleAnchorSource;31 32// This anchor is used to force the linker to link the BoostModule.33extern volatile int BoostModuleAnchorSource;34[[maybe_unused]] static int BoostModuleAnchorDestination =35    BoostModuleAnchorSource;36 37// This anchor is used to force the linker to link the BugproneModule.38extern volatile int BugproneModuleAnchorSource;39[[maybe_unused]] static int BugproneModuleAnchorDestination =40    BugproneModuleAnchorSource;41 42// This anchor is used to force the linker to link the CERTModule.43extern volatile int CERTModuleAnchorSource;44[[maybe_unused]] static int CERTModuleAnchorDestination =45    CERTModuleAnchorSource;46 47// This anchor is used to force the linker to link the ConcurrencyModule.48extern volatile int ConcurrencyModuleAnchorSource;49[[maybe_unused]] static int ConcurrencyModuleAnchorDestination =50    ConcurrencyModuleAnchorSource;51 52// This anchor is used to force the linker to link the CppCoreGuidelinesModule.53extern volatile int CppCoreGuidelinesModuleAnchorSource;54[[maybe_unused]] static int CppCoreGuidelinesModuleAnchorDestination =55    CppCoreGuidelinesModuleAnchorSource;56 57#if CLANG_TIDY_ENABLE_QUERY_BASED_CUSTOM_CHECKS58// This anchor is used to force the linker to link the CustomModule.59extern volatile int CustomModuleAnchorSource;60[[maybe_unused]] static int CustomModuleAnchorDestination =61    CustomModuleAnchorSource;62#endif63 64// This anchor is used to force the linker to link the DarwinModule.65extern volatile int DarwinModuleAnchorSource;66[[maybe_unused]] static int DarwinModuleAnchorDestination =67    DarwinModuleAnchorSource;68 69// This anchor is used to force the linker to link the FuchsiaModule.70extern volatile int FuchsiaModuleAnchorSource;71[[maybe_unused]] static int FuchsiaModuleAnchorDestination =72    FuchsiaModuleAnchorSource;73 74// This anchor is used to force the linker to link the GoogleModule.75extern volatile int GoogleModuleAnchorSource;76[[maybe_unused]] static int GoogleModuleAnchorDestination =77    GoogleModuleAnchorSource;78 79// This anchor is used to force the linker to link the HICPPModule.80extern volatile int HICPPModuleAnchorSource;81[[maybe_unused]] static int HICPPModuleAnchorDestination =82    HICPPModuleAnchorSource;83 84// This anchor is used to force the linker to link the LinuxKernelModule.85extern volatile int LinuxKernelModuleAnchorSource;86[[maybe_unused]] static int LinuxKernelModuleAnchorDestination =87    LinuxKernelModuleAnchorSource;88 89// This anchor is used to force the linker to link the LLVMModule.90extern volatile int LLVMModuleAnchorSource;91[[maybe_unused]] static int LLVMModuleAnchorDestination =92    LLVMModuleAnchorSource;93 94// This anchor is used to force the linker to link the LLVMLibcModule.95extern volatile int LLVMLibcModuleAnchorSource;96[[maybe_unused]] static int LLVMLibcModuleAnchorDestination =97    LLVMLibcModuleAnchorSource;98 99// This anchor is used to force the linker to link the MiscModule.100extern volatile int MiscModuleAnchorSource;101[[maybe_unused]] static int MiscModuleAnchorDestination =102    MiscModuleAnchorSource;103 104// This anchor is used to force the linker to link the ModernizeModule.105extern volatile int ModernizeModuleAnchorSource;106[[maybe_unused]] static int ModernizeModuleAnchorDestination =107    ModernizeModuleAnchorSource;108 109#if CLANG_TIDY_ENABLE_STATIC_ANALYZER &&                                       \110    !defined(CLANG_TIDY_DISABLE_STATIC_ANALYZER_CHECKS)111// This anchor is used to force the linker to link the MPIModule.112extern volatile int MPIModuleAnchorSource;113[[maybe_unused]] static int MPIModuleAnchorDestination = MPIModuleAnchorSource;114#endif115 116// This anchor is used to force the linker to link the ObjCModule.117extern volatile int ObjCModuleAnchorSource;118[[maybe_unused]] static int ObjCModuleAnchorDestination =119    ObjCModuleAnchorSource;120 121// This anchor is used to force the linker to link the OpenMPModule.122extern volatile int OpenMPModuleAnchorSource;123[[maybe_unused]] static int OpenMPModuleAnchorDestination =124    OpenMPModuleAnchorSource;125 126// This anchor is used to force the linker to link the PerformanceModule.127extern volatile int PerformanceModuleAnchorSource;128[[maybe_unused]] static int PerformanceModuleAnchorDestination =129    PerformanceModuleAnchorSource;130 131// This anchor is used to force the linker to link the PortabilityModule.132extern volatile int PortabilityModuleAnchorSource;133[[maybe_unused]] static int PortabilityModuleAnchorDestination =134    PortabilityModuleAnchorSource;135 136// This anchor is used to force the linker to link the ReadabilityModule.137extern volatile int ReadabilityModuleAnchorSource;138[[maybe_unused]] static int ReadabilityModuleAnchorDestination =139    ReadabilityModuleAnchorSource;140 141// This anchor is used to force the linker to link the ZirconModule.142extern volatile int ZirconModuleAnchorSource;143[[maybe_unused]] static int ZirconModuleAnchorDestination =144    ZirconModuleAnchorSource;145 146} // namespace clang::tidy147 148#endif149