source: src/Common/Eval.hpp @ 02101a4

Last change on this file since 02101a4 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: 845 bytes
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// Eval.hpp -- Evaluate parts of the ast at compile time.
8//
9// Author           : Andrew Beach
10// Created On       : Fri Feb 17 11:41:00 2023
11// Last Modified By : Andrew Beach
12// Last Modified On : Fri Feb 17 11:41:00 2023
13// Update Count     : 0
14//
15
16#pragma once
17
18#include <utility>                 // for pair
19
20class Expression;
21namespace ast {
22        class Expr;
23}
24
25struct Evaluation {
26        long long int knownValue;
27        bool hasKnownValue;
28        bool isEvaluableInGCC;
29};
30
31/// Evaluates expr as a long long int.
32Evaluation eval(const ast::Expr * expr);
33
34// Local Variables: //
35// tab-width: 4 //
36// mode: c++ //
37// compile-command: "make install" //
38// End: //
Note: See TracBrowser for help on using the repository browser.