|
Last change
on this file since dd37afa was b8b5535, checked in by Andrew Beach <ajbeach@…>, 2 years ago |
|
Major round of clean-up in the GenPoly directory.
|
-
Property mode
set to
100644
|
|
File size:
1.3 KB
|
| Line | |
|---|
| 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 | // FindFunction.h -- Find function types in a larger type.
|
|---|
| 8 | //
|
|---|
| 9 | // Author : Richard C. Bilson
|
|---|
| 10 | // Created On : Mon May 18 07:44:20 2015
|
|---|
| 11 | // Last Modified By : Andrew Beach
|
|---|
| 12 | // Last Modified On : Fri Oct 7 10:30:00 2022
|
|---|
| 13 | // Update Count : 3
|
|---|
| 14 | //
|
|---|
| 15 |
|
|---|
| 16 | #pragma once
|
|---|
| 17 |
|
|---|
| 18 | #include "GenPoly.h" // for TypeVarMap
|
|---|
| 19 |
|
|---|
| 20 | namespace GenPoly {
|
|---|
| 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 |
|
|---|
| 34 | } // namespace GenPoly
|
|---|
| 35 |
|
|---|
| 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.