summaryrefslogtreecommitdiff
path: root/clang/include/clang/Analysis/Analyses/Interval.h
blob: 6c0d5cf85fd6e95aca0eb2daa2e3b68bd135e086 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
//===- Interval.h - Integer Interval Analysis for Source CFGs     -*- C++ --*-//
//
//                     The LLVM Compiler Infrastructure
//
// This file is distributed under the University of Illinois Open Source
// License. See LICENSE.TXT for details.
//
//===----------------------------------------------------------------------===//
//
// This file implements Live Variables analysis for source-level CFGs.
//
//===----------------------------------------------------------------------===//

#ifndef LLVM_CLANG_INTERVAL_ANALYSIS_H
#define LLVM_CLANG_INTERVAL_ANALYSIS_H

#include "clang/Analysis/AnalysisContext.h"
#include "clang/AST/Decl.h"
#include "llvm/ADT/DenseMap.h"
#include "llvm/ADT/ImmutableSet.h"

namespace clang {

class CFG;
class CFGBlock;
class Stmt;
class DeclRefExpr;
class SourceManager;
  
class IntervalAnalysis : public ManagedAnalysis {
public:

  IntervalAnalysis(AnalysisDeclContext &analysisContext);
  virtual ~IntervalAnalysis();

  void runOnAllBlocks();
  
  static IntervalAnalysis *create(AnalysisDeclContext &analysisContext) {
    return new IntervalAnalysis(analysisContext);
  }
  
  static const void *getTag();
  
private:
  AnalysisDeclContext* context;
};
  
} // end namespace clang

#endif