source: src/AST/Inspect.hpp @ 4eebbcc

ADTast-experimental
Last change on this file since 4eebbcc was e01eb4a, checked in by Andrew Beach <ajbeach@…>, 2 years ago

Moved some functions from InitTweak? to Inspect.

  • Property mode set to 100644
File size: 1.3 KB
RevLine 
[b70abaf]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//
[7b71402]7// Inspect.hpp -- Helpers to get information from the AST.
[b70abaf]8//
9// Author           : Thierry Delisle
10// Created On       : Fri Jun 24 13:16:31 2022
[7b71402]11// Last Modified By : Andrew Beach
[e01eb4a]12// Last Modified On : Thr Sep 22 13:44:00 2022
13// Update Count     : 2
[b70abaf]14//
15
16#include "AST/Fwd.hpp"
17
18namespace ast {
[7b71402]19
[e01eb4a]20/// Returns the base type of an pointer/array/reference type,
21/// if the argument is not one of those types, return null.
22const Type * getPointerBase( const Type * );
23
24/// Get the declaration of the function called (ApplicationExpr or UntypedExpr).
25const DeclWithType * getFunction( const Expr * expr );
26
27/// Get the name of the function being called.
28std::string getFunctionName( const Expr * expr );
29
30/// Returns the argument to a call expression in position N, indexed from 0.
31const Expr * getCallArg( const Expr * call, unsigned pos );
32
33/// Does the structure end in a flexable array declaration?
34bool structHasFlexibleArray( const StructDecl * );
35
36/// If the expression is an application whose target function is an
37/// intrinsic, then returns a pointer to that application.
38const ApplicationExpr * isIntrinsicCallExpr( const Expr * expr );
[7b71402]39
40}
Note: See TracBrowser for help on using the repository browser.