Debian Codegraph @

clang_delta/RemoveAddrTaken.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 REMOVE_ADDR_TAKEN_H
12 #define REMOVE_ADDR_TAKEN_H
13
14 #include "Transformation.h"
15 #include "llvm/ADT/SmallPtrSet.h"
16
17 namespace clang {
18 class DeclGroupRef;
19 class ASTContext;
20 class UnaryOperator;
21 }
22
23 class RemoveAddrTakenCollectionVisitor;
24
25 class RemoveAddrTaken : public Transformation {
26 friend class RemoveAddrTakenCollectionVisitor;
27
28 public:
29
30 RemoveAddrTaken(const char *TransName, const char *Desc)
31 : Transformation(TransName, Desc),
32 CollectionVisitor(NULL)
33 { }
34
35 ~RemoveAddrTaken(void);
36
37 private:
38
39 typedef llvm::SmallPtrSet<const clang::UnaryOperator *, 10> UnaryOperatorSet;
40
41 virtual void Initialize(clang::ASTContext &context);
42
43 virtual bool HandleTopLevelDecl(clang::DeclGroupRef D);
44
45 virtual void HandleTranslationUnit(clang::ASTContext &Ctx);
46
47 void rewriteAddrTakenOp(const clang::UnaryOperator *UO);
48
49 UnaryOperatorSet VisitedAddrTakenOps;
50
51 RemoveAddrTakenCollectionVisitor *CollectionVisitor;
52
53 const clang::UnaryOperator *TheUO;
54
55 // Unimplemented
56 RemoveAddrTaken(void);
57
58 RemoveAddrTaken(const RemoveAddrTaken &);
59
60 void operator=(const RemoveAddrTaken &);
61 };
62
63 #endif