~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/utils/TableGen/CodeGenIntrinsics.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
//===- CodeGenIntrinsic.h - Intrinsic Class Wrapper ------------*- 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 defines a wrapper class for the 'Intrinsic' TableGen class.
 
11
//
 
12
//===----------------------------------------------------------------------===//
 
13
 
 
14
#ifndef CODEGEN_INTRINSIC_H
 
15
#define CODEGEN_INTRINSIC_H
 
16
 
 
17
#include <string>
 
18
#include <vector>
 
19
#include "llvm/CodeGen/ValueTypes.h"
 
20
 
 
21
namespace llvm {
 
22
  class Record;
 
23
  class RecordKeeper;
 
24
  class CodeGenTarget;
 
25
 
 
26
  struct CodeGenIntrinsic {
 
27
    Record *TheDef;            // The actual record defining this intrinsic.
 
28
    std::string Name;          // The name of the LLVM function "llvm.bswap.i32"
 
29
    std::string EnumName;      // The name of the enum "bswap_i32"
 
30
    std::string GCCBuiltinName;// Name of the corresponding GCC builtin, or "".
 
31
    std::string TargetPrefix;  // Target prefix, e.g. "ppc" for t-s intrinsics.
 
32
 
 
33
    /// IntrinsicSignature - This structure holds the return values and
 
34
    /// parameter values of an intrinsic. If the number of return values is > 1,
 
35
    /// then the intrinsic implicitly returns a first-class aggregate. The
 
36
    /// numbering of the types starts at 0 with the first return value and
 
37
    /// continues from there through the parameter list. This is useful for
 
38
    /// "matching" types.
 
39
    struct IntrinsicSignature {
 
40
      /// RetVTs - The MVT::SimpleValueType for each return type. Note that this
 
41
      /// list is only populated when in the context of a target .td file. When
 
42
      /// building Intrinsics.td, this isn't available, because we don't know
 
43
      /// the target pointer size.
 
44
      std::vector<MVT::SimpleValueType> RetVTs;
 
45
 
 
46
      /// RetTypeDefs - The records for each return type.
 
47
      std::vector<Record*> RetTypeDefs;
 
48
 
 
49
      /// ParamVTs - The MVT::SimpleValueType for each parameter type. Note that
 
50
      /// this list is only populated when in the context of a target .td file.
 
51
      /// When building Intrinsics.td, this isn't available, because we don't
 
52
      /// know the target pointer size.
 
53
      std::vector<MVT::SimpleValueType> ParamVTs;
 
54
 
 
55
      /// ParamTypeDefs - The records for each parameter type.
 
56
      std::vector<Record*> ParamTypeDefs;
 
57
    };
 
58
 
 
59
    IntrinsicSignature IS;
 
60
 
 
61
    // Memory mod/ref behavior of this intrinsic.
 
62
    enum {
 
63
      NoMem, ReadArgMem, ReadMem, WriteArgMem, WriteMem
 
64
    } ModRef;
 
65
 
 
66
    /// This is set to true if the intrinsic is overloaded by its argument
 
67
    /// types.
 
68
    bool isOverloaded;
 
69
 
 
70
    /// isCommutative - True if the intrinsic is commutative.
 
71
    bool isCommutative;
 
72
    
 
73
    enum ArgAttribute {
 
74
      NoCapture
 
75
    };
 
76
    std::vector<std::pair<unsigned, ArgAttribute> > ArgumentAttributes;
 
77
 
 
78
    CodeGenIntrinsic(Record *R);
 
79
  };
 
80
 
 
81
  /// LoadIntrinsics - Read all of the intrinsics defined in the specified
 
82
  /// .td file.
 
83
  std::vector<CodeGenIntrinsic> LoadIntrinsics(const RecordKeeper &RC,
 
84
                                               bool TargetOnly);
 
85
}
 
86
 
 
87
#endif