Last change
on this file since 6740533e was
2c8946b,
checked in by Andrew Beach <ajbeach@…>, 6 months ago
|
Various whitespace and intentation updates.
|
-
Property mode set to
100644
|
File size:
996 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 | // FunctionSpec.hpp -- |
---|
8 | // |
---|
9 | // Author : Aaron B. Moss |
---|
10 | // Created On : Thu May 9 10:00:00 2019 |
---|
11 | // Last Modified By : Aaron B. Moss |
---|
12 | // Last Modified On : Thu May 9 10:00:00 2019 |
---|
13 | // Update Count : 1 |
---|
14 | // |
---|
15 | |
---|
16 | #pragma once |
---|
17 | |
---|
18 | #include "Bitfield.hpp" |
---|
19 | |
---|
20 | namespace ast { |
---|
21 | |
---|
22 | namespace Function { |
---|
23 | |
---|
24 | /// Bitflags for function specifiers |
---|
25 | enum { |
---|
26 | Inline = 1 << 0, |
---|
27 | Noreturn = 1 << 1, |
---|
28 | Fortran = 1 << 2, |
---|
29 | }; |
---|
30 | |
---|
31 | /// Bitflag type for storage classes |
---|
32 | struct spec_flags { |
---|
33 | union { |
---|
34 | unsigned int val; |
---|
35 | struct { |
---|
36 | bool is_inline : 1; |
---|
37 | bool is_noreturn : 1; |
---|
38 | bool is_fortran : 1; |
---|
39 | }; |
---|
40 | }; |
---|
41 | |
---|
42 | constexpr spec_flags( unsigned int val = 0 ) : val(val) {} |
---|
43 | }; |
---|
44 | |
---|
45 | using Specs = bitfield<spec_flags>; |
---|
46 | |
---|
47 | } |
---|
48 | |
---|
49 | } |
---|
50 | |
---|
51 | // Local Variables: // |
---|
52 | // tab-width: 4 // |
---|
53 | // mode: c++ // |
---|
54 | // compile-command: "make install" // |
---|
55 | // End: // |
---|
Note: See
TracBrowser
for help on using the repository browser.