ADTast-experimental
Last change
on this file since a33a5e2 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
|
Rev | Line | |
---|
[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 | |
---|
| 18 | namespace 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. |
---|
| 22 | const Type * getPointerBase( const Type * ); |
---|
| 23 | |
---|
| 24 | /// Get the declaration of the function called (ApplicationExpr or UntypedExpr). |
---|
| 25 | const DeclWithType * getFunction( const Expr * expr ); |
---|
| 26 | |
---|
| 27 | /// Get the name of the function being called. |
---|
| 28 | std::string getFunctionName( const Expr * expr ); |
---|
| 29 | |
---|
| 30 | /// Returns the argument to a call expression in position N, indexed from 0. |
---|
| 31 | const Expr * getCallArg( const Expr * call, unsigned pos ); |
---|
| 32 | |
---|
| 33 | /// Does the structure end in a flexable array declaration? |
---|
| 34 | bool 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. |
---|
| 38 | const ApplicationExpr * isIntrinsicCallExpr( const Expr * expr ); |
---|
[7b71402] | 39 | |
---|
| 40 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.