Debian Codegraph @

clang_delta/LiftAssignmentExpr.h

raw symbols SCIP
1 //===----------------------------------------------------------------------===//
2 //
3 // Copyright (c) 2012 The University of Utah
4 // All rights reserved.
5 //
6 // This file is distributed under the University of Illinois Open Source
7 // License. See the file COPYING for details.
8 //
9 //===----------------------------------------------------------------------===//
10
11 #ifndef LIFT_ASSIGNMENT_EXPR_H
12 #define LIFT_ASSIGNMENT_EXPR_H
13
14 #include <string>
15 #include "llvm/ADT/SmallVector.h"
16 #include "Transformation.h"
17
18 namespace clang {
19 class DeclGroupRef;
20 class ASTContext;
21 class FunctionDecl;
22 class Stmt;
23 class BinaryOperator;
24 }
25
26 class AssignExprCollectionVisitor;
27 class AssignExprStatementVisitor;
28
29 class LiftAssignmentExpr : public Transformation {
30 friend class AssignExprCollectionVisitor;
31 friend class AssignExprStatementVisitor;
32
33 public:
34
35 LiftAssignmentExpr(const char *TransName, const char *Desc)
36 : Transformation(TransName, Desc),
37 CollectionVisitor(NULL),
38 StmtVisitor(NULL),
39 TheFuncDecl(NULL),
40 TheStmt(NULL),
41 TheAssignExpr(NULL),
42 NeedParen(false)
43 { }
44
45 ~LiftAssignmentExpr(void);
46
47 private:
48
49 virtual void Initialize(clang::ASTContext &context);
50
51 virtual bool HandleTopLevelDecl(clang::DeclGroupRef D);
52
53 virtual void HandleTranslationUnit(clang::ASTContext &Ctx);
54
55 bool addNewAssignStmt(void);
56
57 bool replaceAssignExpr(void);
58
59 clang::SmallVector<clang::BinaryOperator *, 20> ValidAssignExprs;
60
61 AssignExprCollectionVisitor *CollectionVisitor;
62
63 AssignExprStatementVisitor *StmtVisitor;
64
65 clang::FunctionDecl *TheFuncDecl;
66
67 clang::Stmt *TheStmt;
68
69 clang::BinaryOperator *TheAssignExpr;
70
71 bool NeedParen;
72
73 // Unimplemented
74 LiftAssignmentExpr(void);
75
76 LiftAssignmentExpr(const LiftAssignmentExpr &);
77
78 void operator=(const LiftAssignmentExpr &);
79 };
80 #endif