Last change
on this file since bf64de3 was
0658672,
checked in by Andrew Beach <ajbeach@…>, 15 months ago
|
Improved hoisting. However, I had to change some code because of other errors, so more work will have to be done. Also folded in another invariant for MemberExpr?.
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Rev | Line | |
---|
[2bb4a01] | 1 | // |
---|
| 2 | // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo |
---|
| 3 | // |
---|
| 4 | // The contents of this file are covered under the licence agreement in the |
---|
| 5 | // file "LICENCE" distributed with Cforall. |
---|
| 6 | // |
---|
| 7 | // DeclReplacer.hpp -- |
---|
| 8 | // |
---|
| 9 | // Author : Aaron B. Moss |
---|
| 10 | // Created On : Wed May 8 13:00:00 2019 |
---|
| 11 | // Last Modified By : Aaron B. Moss |
---|
| 12 | // Last Modified On : Wed May 8 13:00:00 2019 |
---|
| 13 | // Update Count : 1 |
---|
| 14 | // |
---|
| 15 | |
---|
| 16 | #pragma once |
---|
| 17 | |
---|
| 18 | #include <unordered_map> |
---|
| 19 | |
---|
| 20 | namespace ast { |
---|
| 21 | class DeclWithType; |
---|
[490fb92e] | 22 | class Expr; |
---|
[0658672] | 23 | class Node; |
---|
| 24 | class TypeDecl; |
---|
| 25 | } |
---|
| 26 | |
---|
| 27 | namespace ast { |
---|
| 28 | |
---|
| 29 | namespace DeclReplacer { |
---|
| 30 | |
---|
| 31 | using DeclMap = std::unordered_map< const DeclWithType *, const DeclWithType * >; |
---|
| 32 | using TypeMap = std::unordered_map< const TypeDecl *, const TypeDecl * >; |
---|
| 33 | using ExprMap = std::unordered_map< const DeclWithType *, const Expr * >; |
---|
[2bb4a01] | 34 | |
---|
[0658672] | 35 | const Node * replace( const Node * node, const DeclMap & declMap, bool debug = false ); |
---|
| 36 | const Node * replace( const Node * node, const TypeMap & typeMap, bool debug = false ); |
---|
| 37 | const Node * replace( const Node * node, const DeclMap & declMap, const TypeMap & typeMap, bool debug = false ); |
---|
| 38 | const Node * replace( const Node * node, const ExprMap & exprMap); |
---|
| 39 | |
---|
| 40 | } |
---|
[2bb4a01] | 41 | |
---|
| 42 | } |
---|
| 43 | |
---|
| 44 | // Local Variables: // |
---|
| 45 | // tab-width: 4 // |
---|
| 46 | // mode: c++ // |
---|
| 47 | // compile-command: "make install" // |
---|
| 48 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.