~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/include/llvm/Target/TargetSelect.h

  • Committer: Bazaar Package Importer
  • Author(s): Scott Kitterman
  • Date: 2010-03-12 11:30:04 UTC
  • mfrom: (0.41.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20100312113004-b0fop4bkycszdd0z
Tags: 0.96~rc1+dfsg-0ubuntu1
* New upstream RC - FFE (LP: #537636):
  - Add OfficialDatabaseOnly option to clamav-base.postinst.in
  - Add LocalSocketGroup option to clamav-base.postinst.in
  - Add LocalSocketMode option to clamav-base.postinst.in
  - Add CrossFilesystems option to clamav-base.postinst.in
  - Add ClamukoScannerCount option to clamav-base.postinst.in
  - Add BytecodeSecurity opiton to clamav-base.postinst.in
  - Add DetectionStatsHostID option to clamav-freshclam.postinst.in
  - Add Bytecode option to clamav-freshclam.postinst.in
  - Add MilterSocketGroup option to clamav-milter.postinst.in
  - Add MilterSocketMode option to clamav-milter.postinst.in
  - Add ReportHostname option to clamav-milter.postinst.in
  - Bump libclamav SO version to 6.1.0 in libclamav6.install
  - Drop clamdmon from clamav.examples (no longer shipped by upstream)
  - Drop libclamav.a from libclamav-dev.install (not built by upstream)
  - Update SO version for lintian override for libclamav6
  - Add new Bytecode Testing Tool, usr/bin/clambc, to clamav.install
  - Add build-depends on python and python-setuptools for new test suite
  - Update debian/copyright for the embedded copy of llvm (using the system
    llvm is not currently feasible)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//===- TargetSelect.h - Target Selection & Registration ---------*- 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 file provides utilities to make sure that certain classes of targets are
 
11
// linked into the main application executable, and initialize them as
 
12
// appropriate.
 
13
//
 
14
//===----------------------------------------------------------------------===//
 
15
 
 
16
#ifndef LLVM_TARGET_TARGETSELECT_H
 
17
#define LLVM_TARGET_TARGETSELECT_H
 
18
 
 
19
#include "llvm/Config/config.h"
 
20
 
 
21
extern "C" {
 
22
  // Declare all of the target-initialization functions that are available.
 
23
#define LLVM_TARGET(TargetName) void LLVMInitialize##TargetName##TargetInfo();
 
24
#include "llvm/Config/Targets.def"
 
25
 
 
26
#define LLVM_TARGET(TargetName) void LLVMInitialize##TargetName##Target();
 
27
#include "llvm/Config/Targets.def"
 
28
  
 
29
  // Declare all of the available assembly printer initialization functions.
 
30
#define LLVM_ASM_PRINTER(TargetName) void LLVMInitialize##TargetName##AsmPrinter();
 
31
#include "llvm/Config/AsmPrinters.def"
 
32
 
 
33
  // Declare all of the available assembly parser initialization functions.
 
34
#define LLVM_ASM_PARSER(TargetName) void LLVMInitialize##TargetName##AsmParser();
 
35
#include "llvm/Config/AsmParsers.def"
 
36
 
 
37
  // Declare all of the available disassembler initialization functions.
 
38
#define LLVM_DISASSEMBLER(TargetName) void LLVMInitialize##TargetName##Disassembler();
 
39
#include "llvm/Config/Disassemblers.def"
 
40
}
 
41
 
 
42
namespace llvm {
 
43
  /// InitializeAllTargetInfos - The main program should call this function if
 
44
  /// it wants access to all available targets that LLVM is configured to
 
45
  /// support, to make them available via the TargetRegistry.
 
46
  ///
 
47
  /// It is legal for a client to make multiple calls to this function.
 
48
  inline void InitializeAllTargetInfos() {
 
49
#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##TargetInfo();
 
50
#include "llvm/Config/Targets.def"
 
51
  }
 
52
  
 
53
  /// InitializeAllTargets - The main program should call this function if it
 
54
  /// wants access to all available target machines that LLVM is configured to
 
55
  /// support, to make them available via the TargetRegistry.
 
56
  ///
 
57
  /// It is legal for a client to make multiple calls to this function.
 
58
  inline void InitializeAllTargets() {
 
59
    // FIXME: Remove this, clients should do it.
 
60
    InitializeAllTargetInfos();
 
61
 
 
62
#define LLVM_TARGET(TargetName) LLVMInitialize##TargetName##Target();
 
63
#include "llvm/Config/Targets.def"
 
64
  }
 
65
  
 
66
  /// InitializeAllAsmPrinters - The main program should call this function if
 
67
  /// it wants all asm printers that LLVM is configured to support, to make them
 
68
  /// available via the TargetRegistry.
 
69
  ///
 
70
  /// It is legal for a client to make multiple calls to this function.
 
71
  inline void InitializeAllAsmPrinters() {
 
72
#define LLVM_ASM_PRINTER(TargetName) LLVMInitialize##TargetName##AsmPrinter();
 
73
#include "llvm/Config/AsmPrinters.def"
 
74
  }
 
75
  
 
76
  /// InitializeAllAsmParsers - The main program should call this function if it
 
77
  /// wants all asm parsers that LLVM is configured to support, to make them
 
78
  /// available via the TargetRegistry.
 
79
  ///
 
80
  /// It is legal for a client to make multiple calls to this function.
 
81
  inline void InitializeAllAsmParsers() {
 
82
#define LLVM_ASM_PARSER(TargetName) LLVMInitialize##TargetName##AsmParser();
 
83
#include "llvm/Config/AsmParsers.def"
 
84
  }
 
85
  
 
86
  /// InitializeAllDisassemblers - The main program should call this function if
 
87
  /// it wants all disassemblers that LLVM is configured to support, to make
 
88
  /// them available via the TargetRegistry.
 
89
  ///
 
90
  /// It is legal for a client to make multiple calls to this function.
 
91
  inline void InitializeAllDisassemblers() {
 
92
#define LLVM_DISASSEMBLER(TargetName) LLVMInitialize##TargetName##Disassembler();
 
93
#include "llvm/Config/Disassemblers.def"
 
94
  }
 
95
  
 
96
  /// InitializeNativeTarget - The main program should call this function to
 
97
  /// initialize the native target corresponding to the host.  This is useful 
 
98
  /// for JIT applications to ensure that the target gets linked in correctly.
 
99
  ///
 
100
  /// It is legal for a client to make multiple calls to this function.
 
101
  inline bool InitializeNativeTarget() {
 
102
  // If we have a native target, initialize it to ensure it is linked in.
 
103
#ifdef LLVM_NATIVE_ARCH
 
104
#define DoInit2(TARG) \
 
105
    LLVMInitialize ## TARG ## Info ();          \
 
106
    LLVMInitialize ## TARG ()
 
107
#define DoInit(T) DoInit2(T)
 
108
    DoInit(LLVM_NATIVE_ARCH);
 
109
    return false;
 
110
#undef DoInit
 
111
#undef DoInit2
 
112
#else
 
113
    return true;
 
114
#endif
 
115
  }  
 
116
}
 
117
 
 
118
#endif