1 //===--- ForceLinkageMacros.h - The LLVM Compiler Driver --------*- C++ -*-===//
3 // The LLVM Compiler Infrastructure
5 // This file is distributed under the University of Illinois Open
6 // Source License. See LICENSE.TXT for details.
8 //===----------------------------------------------------------------------===//
10 // Preprocessor magic that forces references to static libraries - common
11 // macros used by both driver and plugins.
13 //===----------------------------------------------------------------------===//
15 #ifndef LLVM_INCLUDE_COMPILER_DRIVER_FORCE_LINKAGE_MACROS_H
16 #define LLVM_INCLUDE_COMPILER_DRIVER_FORCE_LINKAGE_MACROS_H
18 #define LLVMC_FORCE_LINKAGE_PREFIX(PluginName) ForceLinkage ## PluginName
20 #define LLVMC_FORCE_LINKAGE_FUN(PluginName) \
21 LLVMC_FORCE_LINKAGE_PREFIX(PluginName)
23 #define LLVMC_FORCE_LINKAGE_DECL(PluginName) \
24 void LLVMC_FORCE_LINKAGE_FUN(PluginName) ()
26 #define LLVMC_FORCE_LINKAGE_CALL(PluginName) \
27 LLVMC_FORCE_LINKAGE_FUN(PluginName) ()
29 #endif // LLVM_INCLUDE_COMPILER_DRIVER_FORCE_LINKAGE_MACROS_H