~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/include/llvm/System/Host.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
//===- llvm/System/Host.h - Host machine characteristics --------*- 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
// Methods for querying the nature of the host machine.
 
11
//
 
12
//===----------------------------------------------------------------------===//
 
13
 
 
14
#ifndef LLVM_SYSTEM_HOST_H
 
15
#define LLVM_SYSTEM_HOST_H
 
16
 
 
17
#include "llvm/ADT/StringMap.h"
 
18
#include <string>
 
19
 
 
20
namespace llvm {
 
21
namespace sys {
 
22
 
 
23
  inline bool isLittleEndianHost() {
 
24
    union {
 
25
      int i;
 
26
      char c;
 
27
    };
 
28
    i = 1;
 
29
    return c;
 
30
  }
 
31
 
 
32
  inline bool isBigEndianHost() {
 
33
    return !isLittleEndianHost();
 
34
  }
 
35
 
 
36
  /// getHostTriple() - Return the target triple of the running
 
37
  /// system.
 
38
  ///
 
39
  /// The target triple is a string in the format of:
 
40
  ///   CPU_TYPE-VENDOR-OPERATING_SYSTEM
 
41
  /// or
 
42
  ///   CPU_TYPE-VENDOR-KERNEL-OPERATING_SYSTEM
 
43
  std::string getHostTriple();
 
44
 
 
45
  /// getHostCPUName - Get the LLVM name for the host CPU. The particular format
 
46
  /// of the name is target dependent, and suitable for passing as -mcpu to the
 
47
  /// target which matches the host.
 
48
  ///
 
49
  /// \return - The host CPU name, or empty if the CPU could not be determined.
 
50
  std::string getHostCPUName();
 
51
 
 
52
  /// getHostCPUFeatures - Get the LLVM names for the host CPU features.
 
53
  /// The particular format of the names are target dependent, and suitable for
 
54
  /// passing as -mattr to the target which matches the host.
 
55
  ///
 
56
  /// \param Features - A string mapping feature names to either
 
57
  /// true (if enabled) or false (if disabled). This routine makes no guarantees
 
58
  /// about exactly which features may appear in this map, except that they are
 
59
  /// all valid LLVM feature names.
 
60
  ///
 
61
  /// \return - True on success.
 
62
  bool getHostCPUFeatures(StringMap<bool> &Features);
 
63
}
 
64
}
 
65
 
 
66
#endif