source: src/GenPoly/FindFunction.hpp @ 0766399

Last change on this file since 0766399 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
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.hpp -- 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.hpp"            // for TypeVarMap
19
20namespace GenPoly {
21
22typedef bool (*FindFunctionPred)( const ast::FunctionType *, const TypeVarMap & );
23
24/// Recursively walks `type`, placing all functions that match `predicate`
25/// under `typeVars` into `functions`.
26void 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)`.
30const 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.