~ubuntu-branches/ubuntu/wily/clamav/wily-proposed

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/include/llvm/LLVMContext.h

  • Committer: Package Import Robot
  • Author(s): Scott Kitterman, Sebastian Andrzej Siewior, Andreas Cadhalpun, Scott Kitterman, Javier Fernández-Sanguino
  • Date: 2015-01-28 00:25:13 UTC
  • mfrom: (0.48.14 sid)
  • Revision ID: package-import@ubuntu.com-20150128002513-lil2oi74cooy4lzr
Tags: 0.98.6+dfsg-1
[ Sebastian Andrzej Siewior ]
* update "fix-ssize_t-size_t-off_t-printf-modifier", include of misc.h was
  missing but was pulled in via the systemd patch.
* Don't leak return codes from libmspack to clamav API. (Closes: #774686).

[ Andreas Cadhalpun ]
* Add patch to avoid emitting incremental progress messages when not
  outputting to a terminal. (Closes: #767350)
* Update lintian-overrides for unused-file-paragraph-in-dep5-copyright.
* clamav-base.postinst: always chown /var/log/clamav and /var/lib/clamav
  to clamav:clamav, not only on fresh installations. (Closes: #775400)
* Adapt the clamav-daemon and clamav-freshclam logrotate scripts,
  so that they correctly work under systemd.
* Move the PidFile variable from the clamd/freshclam configuration files
  to the init scripts. This makes the init scripts more robust against
  misconfiguration and avoids error messages with systemd. (Closes: #767353)
* debian/copyright: drop files from Files-Excluded only present in github
  tarballs
* Drop Workaround-a-bug-in-libc-on-Hurd.patch, because hurd got fixed.
  (see #752237)
* debian/rules: Remove useless --with-system-tommath --without-included-ltdl
  configure options.

[ Scott Kitterman ]
* Stop stripping llvm when repacking the tarball as the system llvm on some
  releases is too old to use
* New upstream bugfix release
  - Library shared object revisions.
  - Includes a patch from Sebastian Andrzej Siewior making ClamAV pid files
    compatible with systemd.
  - Fix a heap out of bounds condition with crafted Yoda's crypter files.
    This issue was discovered by Felix Groebert of the Google Security Team.
  - Fix a heap out of bounds condition with crafted mew packer files. This
    issue was discovered by Felix Groebert of the Google Security Team.
  - Fix a heap out of bounds condition with crafted upx packer files. This
    issue was discovered by Kevin Szkudlapski of Quarkslab.
  - Fix a heap out of bounds condition with crafted upack packer files. This
    issue was discovered by Sebastian Andrzej Siewior. CVE-2014-9328.
  - Compensate a crash due to incorrect compiler optimization when handling
    crafted petite packer files. This issue was discovered by Sebastian
    Andrzej Siewior.
* Update lintian override for embedded zlib to match new so version

[ Javier Fernández-Sanguino ]
* Updated Spanish Debconf template translation (Closes: #773563)

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//===-- llvm/LLVMContext.h - Class for managing "global" state --*- 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 declares LLVMContext, a container of "global" state in LLVM, such
 
11
// as the global type and constant uniquing tables.
 
12
//
 
13
//===----------------------------------------------------------------------===//
 
14
 
 
15
#ifndef LLVM_LLVMCONTEXT_H
 
16
#define LLVM_LLVMCONTEXT_H
 
17
 
 
18
namespace llvm {
 
19
 
 
20
class LLVMContextImpl;
 
21
class StringRef;
 
22
class Instruction;
 
23
template <typename T> class SmallVectorImpl;
 
24
 
 
25
/// This is an important class for using LLVM in a threaded context.  It
 
26
/// (opaquely) owns and manages the core "global" data of LLVM's core 
 
27
/// infrastructure, including the type and constant uniquing tables.
 
28
/// LLVMContext itself provides no locking guarantees, so you should be careful
 
29
/// to have one context per thread.
 
30
class LLVMContext {
 
31
  // DO NOT IMPLEMENT
 
32
  LLVMContext(LLVMContext&);
 
33
  void operator=(LLVMContext&);
 
34
 
 
35
public:
 
36
  LLVMContextImpl *const pImpl;
 
37
  LLVMContext();
 
38
  ~LLVMContext();
 
39
  
 
40
  // Pinned metadata names, which always have the same value.  This is a
 
41
  // compile-time performance optimization, not a correctness optimization.
 
42
  enum {
 
43
    MD_dbg = 0   // "dbg"
 
44
  };
 
45
  
 
46
  /// getMDKindID - Return a unique non-zero ID for the specified metadata kind.
 
47
  /// This ID is uniqued across modules in the current LLVMContext.
 
48
  unsigned getMDKindID(StringRef Name) const;
 
49
  
 
50
  /// getMDKindNames - Populate client supplied SmallVector with the name for
 
51
  /// custom metadata IDs registered in this LLVMContext.
 
52
  void getMDKindNames(SmallVectorImpl<StringRef> &Result) const;
 
53
  
 
54
  /// setInlineAsmDiagnosticHandler - This method sets a handler that is invoked
 
55
  /// when problems with inline asm are detected by the backend.  The first
 
56
  /// argument is a function pointer (of type SourceMgr::DiagHandlerTy) and the
 
57
  /// second is a context pointer that gets passed into the DiagHandler.
 
58
  ///
 
59
  /// LLVMContext doesn't take ownership or interpreter either of these
 
60
  /// pointers.
 
61
  void setInlineAsmDiagnosticHandler(void *DiagHandler, void *DiagContext = 0);
 
62
 
 
63
  /// getInlineAsmDiagnosticHandler - Return the diagnostic handler set by
 
64
  /// setInlineAsmDiagnosticHandler.
 
65
  void *getInlineAsmDiagnosticHandler() const;
 
66
 
 
67
  /// getInlineAsmDiagnosticContext - Return the diagnostic context set by
 
68
  /// setInlineAsmDiagnosticHandler.
 
69
  void *getInlineAsmDiagnosticContext() const;
 
70
  
 
71
  
 
72
  /// emitError - Emit an error message to the currently installed error handler
 
73
  /// with optional location information.  This function returns, so code should
 
74
  /// be prepared to drop the erroneous construct on the floor and "not crash".
 
75
  /// The generated code need not be correct.  The error message will be
 
76
  /// implicitly prefixed with "error: " and should not end with a ".".
 
77
  void emitError(unsigned LocCookie, StringRef ErrorStr);
 
78
  void emitError(const Instruction *I, StringRef ErrorStr);
 
79
  void emitError(StringRef ErrorStr);
 
80
};
 
81
 
 
82
/// getGlobalContext - Returns a global context.  This is for LLVM clients that
 
83
/// only care about operating on a single thread.
 
84
extern LLVMContext &getGlobalContext();
 
85
 
 
86
}
 
87
 
 
88
#endif