Changeset 2c8946b for src/AST/FunctionSpec.hpp
- Timestamp:
- May 23, 2024, 5:18:27 PM (4 months ago)
- Branches:
- master
- Children:
- dc74231
- Parents:
- fbc84ca
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/FunctionSpec.hpp
rfbc84ca r2c8946b 22 22 namespace Function { 23 23 24 /// Bitflags for function specifiers 25 enum { 26 Inline = 1 << 0, 27 Noreturn = 1 << 1, 28 Fortran = 1 << 2, 29 NumSpecs = 3 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 }; 30 40 }; 31 41 32 /// Bitflag type for storage classes 33 struct spec_flags { 34 union { 35 unsigned int val; 36 struct { 37 bool is_inline : 1; 38 bool is_noreturn : 1; 39 bool is_fortran : 1; 40 }; 42 constexpr spec_flags( unsigned int val = 0 ) : val(val) {} 43 }; 41 44 42 // MakeBitfieldPrint( NumSpecs ) 43 }; 45 using Specs = bitfield<spec_flags>; 44 46 45 constexpr spec_flags( unsigned int val = 0 ) : val(val) {} 46 }; 47 } 47 48 48 using Specs = bitfield<spec_flags>;49 }50 49 } 51 50
Note: See TracChangeset
for help on using the changeset viewer.