source: src/AST/StorageClasses.hpp@ b96d7c1

ADT arm-eh ast-experimental cleanup-dtors enum forall-pointer-decay jacob/cs343-translation jenkins-sandbox new-ast new-ast-unique-expr pthread-emulation qualifiedEnum
Last change on this file since b96d7c1 was a300e4a, checked in by Aaron Moss <a3moss@…>, 6 years ago

Add some decls to the new AST

  • Property mode set to 100644
File size: 1.1 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// StorageClasses.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
20namespace ast {
21
22namespace Storage {
23
24 /// Bitflags for storage classes
25 enum {
26 Extern = 1 << 0,
27 Static = 1 << 1,
28 Auto = 1 << 2,
29 Register = 1 << 3,
30 ThreadLocal = 1 << 4,
31 NumClasses = 5
32 };
33
34 /// Bitflag type for storage classes
35 union Classes {
36 unsigned int val;
37 struct {
38 bool is_extern : 1;
39 bool is_static : 1;
40 bool is_auto : 1;
41 bool is_register : 1;
42 bool is_threadlocal : 1;
43 };
44
45 MakeBitfield( Classes )
46 MakeBitfieldPrint( NumClasses )
47 };
48
49}
50}
51
52// Local Variables: //
53// tab-width: 4 //
54// mode: c++ //
55// compile-command: "make install" //
56// End: //
Note: See TracBrowser for help on using the repository browser.