~louis/ubuntu/trusty/clamav/lp799623_fix_logrotate

« back to all changes in this revision

Viewing changes to libclamav/c++/llvm/include/llvm/CallGraphSCCPass.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
//===- CallGraphSCCPass.h - Pass that operates BU on call graph -*- 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 the CallGraphSCCPass class, which is used for passes which
 
11
// are implemented as bottom-up traversals on the call graph.  Because there may
 
12
// be cycles in the call graph, passes of this type operate on the call-graph in
 
13
// SCC order: that is, they process function bottom-up, except for recursive
 
14
// functions, which they process all at once.
 
15
//
 
16
// These passes are inherently interprocedural, and are required to keep the
 
17
// call graph up-to-date if they do anything which could modify it.
 
18
//
 
19
//===----------------------------------------------------------------------===//
 
20
 
 
21
#ifndef LLVM_CALL_GRAPH_SCC_PASS_H
 
22
#define LLVM_CALL_GRAPH_SCC_PASS_H
 
23
 
 
24
#include "llvm/Pass.h"
 
25
#include "llvm/Analysis/CallGraph.h"
 
26
 
 
27
namespace llvm {
 
28
 
 
29
class CallGraphNode;
 
30
class CallGraph;
 
31
class PMStack;
 
32
 
 
33
struct CallGraphSCCPass : public Pass {
 
34
 
 
35
  explicit CallGraphSCCPass(intptr_t pid) : Pass(PT_CallGraphSCC, pid) {}
 
36
  explicit CallGraphSCCPass(void *pid) : Pass(PT_CallGraphSCC, pid) {}
 
37
 
 
38
  /// doInitialization - This method is called before the SCC's of the program
 
39
  /// has been processed, allowing the pass to do initialization as necessary.
 
40
  virtual bool doInitialization(CallGraph &CG) {
 
41
    return false;
 
42
  }
 
43
 
 
44
  /// runOnSCC - This method should be implemented by the subclass to perform
 
45
  /// whatever action is necessary for the specified SCC.  Note that
 
46
  /// non-recursive (or only self-recursive) functions will have an SCC size of
 
47
  /// 1, where recursive portions of the call graph will have SCC size > 1.
 
48
  ///
 
49
  /// SCC passes that add or delete functions to the SCC are required to update
 
50
  /// the SCC list, otherwise stale pointers may be dereferenced.
 
51
  ///
 
52
  virtual bool runOnSCC(std::vector<CallGraphNode *> &SCC) = 0;
 
53
 
 
54
  /// doFinalization - This method is called after the SCC's of the program has
 
55
  /// been processed, allowing the pass to do final cleanup as necessary.
 
56
  virtual bool doFinalization(CallGraph &CG) {
 
57
    return false;
 
58
  }
 
59
 
 
60
  /// Assign pass manager to manager this pass
 
61
  virtual void assignPassManager(PMStack &PMS,
 
62
                                 PassManagerType PMT = PMT_CallGraphPassManager);
 
63
 
 
64
  ///  Return what kind of Pass Manager can manage this pass.
 
65
  virtual PassManagerType getPotentialPassManagerType() const {
 
66
    return PMT_CallGraphPassManager;
 
67
  }
 
68
 
 
69
  /// getAnalysisUsage - For this class, we declare that we require and preserve
 
70
  /// the call graph.  If the derived class implements this method, it should
 
71
  /// always explicitly call the implementation here.
 
72
  virtual void getAnalysisUsage(AnalysisUsage &Info) const;
 
73
};
 
74
 
 
75
} // End llvm namespace
 
76
 
 
77
#endif