Last change
on this file since 830edc6 was
c92bdcc,
checked in by Andrew Beach <ajbeach@…>, 6 months ago
|
Updated the rest of the names in src/ (except for the generated files).
|
-
Property mode set to
100644
|
File size:
1.3 KB
|
Rev | Line | |
---|
[51587aa] | 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 | // |
---|
[c92bdcc] | 7 | // FindFunction.hpp -- Find function types in a larger type. |
---|
[51587aa] | 8 | // |
---|
| 9 | // Author : Richard C. Bilson |
---|
| 10 | // Created On : Mon May 18 07:44:20 2015 |
---|
[c97b448] | 11 | // Last Modified By : Andrew Beach |
---|
| 12 | // Last Modified On : Fri Oct 7 10:30:00 2022 |
---|
| 13 | // Update Count : 3 |
---|
[51587aa] | 14 | // |
---|
[51b7345] | 15 | |
---|
[6b0b624] | 16 | #pragma once |
---|
[51b7345] | 17 | |
---|
[c92bdcc] | 18 | #include "GenPoly.hpp" // for TypeVarMap |
---|
[08fc48f] | 19 | |
---|
[51b7345] | 20 | namespace GenPoly { |
---|
[c97b448] | 21 | |
---|
| 22 | typedef bool (*FindFunctionPred)( const ast::FunctionType *, const TypeVarMap & ); |
---|
| 23 | |
---|
| 24 | /// Recursively walks `type`, placing all functions that match `predicate` |
---|
| 25 | /// under `typeVars` into `functions`. |
---|
| 26 | void findFunction( const ast::Type * type, |
---|
| 27 | std::vector<ast::ptr<ast::FunctionType>> & functions, |
---|
| 28 | const TypeVarMap & typeVars, FindFunctionPred predicate ); |
---|
| 29 | /// Like findFunction, but also replaces the function type with `void ()(void)`. |
---|
| 30 | const ast::Type * findAndReplaceFunction( const ast::Type * type, |
---|
| 31 | std::vector<ast::ptr<ast::FunctionType>> & functions, |
---|
| 32 | const TypeVarMap & typeVars, FindFunctionPred predicate ); |
---|
| 33 | |
---|
[51b7345] | 34 | } // namespace GenPoly |
---|
| 35 | |
---|
[51587aa] | 36 | // Local Variables: // |
---|
| 37 | // tab-width: 4 // |
---|
| 38 | // mode: c++ // |
---|
| 39 | // compile-command: "make install" // |
---|
| 40 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.