Introduce new headers whose inclusion forces linking and
[oota-llvm.git] / include / llvm / InitializeAllAsmPrinters.h
1 //===- llvm/InitializeAllAsmPrinters.h - Init Asm Printers ------*- C++ -*-===//
2 //
3 //                      The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 //
10 // This header initializes all assembler printers for all configured
11 // LLVM targets, ensuring that they are registered.
12 //
13 //===----------------------------------------------------------------------===//
14 #ifndef LLVM_INITIALIZE_ALL_ASM_PRINTERS_H
15 #define LLVM_INITIALIZE_ALL_ASM_PRINTERS_H
16
17 namespace llvm {
18
19   // Declare all of the target-initialization functions.
20 #define LLVM_ASM_PRINTER(TargetName) void Initialize##TargetName##AsmPrinter();
21 #include "llvm/Config/AsmPrinters.def"
22
23   namespace {
24     struct InitializeAllAsmPrinters {
25       InitializeAllAsmPrinters() {
26         // Call all of the target-initialization functions.
27 #define LLVM_ASM_PRINTER(TargetName) llvm::Initialize##TargetName##AsmPrinter();
28 #include "llvm/Config/AsmPrinters.def"
29       }
30     } DoInitializeAllAsmPrinters;
31   }
32 } // end namespace llvm
33
34 #endif // LLVM_INITIALIZE_ALL_ASM_PRINTERS_H