~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/include/llvm/Target/Mangler.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/Target/Mangler.h - Self-contained name mangler ----*- 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
// Unified name mangler for various backends.
 
11
//
 
12
//===----------------------------------------------------------------------===//
 
13
 
 
14
#ifndef LLVM_SUPPORT_MANGLER_H
 
15
#define LLVM_SUPPORT_MANGLER_H
 
16
 
 
17
#include "llvm/ADT/DenseMap.h"
 
18
#include <string>
 
19
 
 
20
namespace llvm {
 
21
class StringRef;
 
22
class Twine;
 
23
class Value;
 
24
class GlobalValue;
 
25
template <typename T> class SmallVectorImpl; 
 
26
class MCAsmInfo;
 
27
 
 
28
class Mangler {
 
29
public:
 
30
  enum ManglerPrefixTy {
 
31
    Default,               ///< Emit default string before each symbol.
 
32
    Private,               ///< Emit "private" prefix before each symbol.
 
33
    LinkerPrivate          ///< Emit "linker private" prefix before each symbol.
 
34
  };
 
35
 
 
36
private:
 
37
  const MCAsmInfo &MAI;
 
38
 
 
39
  /// AnonGlobalIDs - We need to give global values the same name every time
 
40
  /// they are mangled.  This keeps track of the number we give to anonymous
 
41
  /// ones.
 
42
  ///
 
43
  DenseMap<const GlobalValue*, unsigned> AnonGlobalIDs;
 
44
 
 
45
  /// NextAnonGlobalID - This simple counter is used to unique value names.
 
46
  ///
 
47
  unsigned NextAnonGlobalID;
 
48
 
 
49
public:
 
50
  // Mangler ctor - if a prefix is specified, it will be prepended onto all
 
51
  // symbols.
 
52
  Mangler(const MCAsmInfo &mai) : MAI(mai), NextAnonGlobalID(1) {}
 
53
 
 
54
  /// getNameWithPrefix - Fill OutName with the name of the appropriate prefix
 
55
  /// and the specified global variable's name.  If the global variable doesn't
 
56
  /// have a name, this fills in a unique name for the global.
 
57
  void getNameWithPrefix(SmallVectorImpl<char> &OutName, const GlobalValue *GV,
 
58
                         bool isImplicitlyPrivate);
 
59
  
 
60
  /// getNameWithPrefix - Fill OutName with the name of the appropriate prefix
 
61
  /// and the specified name as the global variable name.  GVName must not be
 
62
  /// empty.
 
63
  void getNameWithPrefix(SmallVectorImpl<char> &OutName, const Twine &GVName,
 
64
                         ManglerPrefixTy PrefixTy = Mangler::Default);
 
65
 
 
66
  /// getNameWithPrefix - Return the name of the appropriate prefix
 
67
  /// and the specified global variable's name.  If the global variable doesn't
 
68
  /// have a name, this fills in a unique name for the global.
 
69
  std::string getNameWithPrefix(const GlobalValue *GV,
 
70
                                bool isImplicitlyPrivate = false);
 
71
};
 
72
 
 
73
} // End llvm namespace
 
74
 
 
75
#endif // LLVM_SUPPORT_MANGLER_H