- Timestamp:
- May 23, 2024, 5:18:27 PM (7 months ago)
- Branches:
- master
- Children:
- dc74231
- Parents:
- fbc84ca
- Location:
- src/AST
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Attribute.hpp
rfbc84ca r2c8946b 53 53 friend node_t * mutate(const node_t * node); 54 54 template<typename node_t> 55 55 friend node_t * shallowCopy(const node_t * node); 56 56 }; 57 57 -
src/AST/Bitfield.hpp
rfbc84ca r2c8946b 60 60 61 61 template<typename T> 62 inline bool operator== 62 inline bool operator==( const bitfield<T> & a, const bitfield<T> & b ) { 63 63 return a.val == b.val; 64 64 } 65 65 66 66 template<typename T> 67 inline bool operator!= 67 inline bool operator!=( const bitfield<T> & a, const bitfield<T> & b ) { 68 68 return !(a == b); 69 69 } -
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 -
src/AST/StorageClasses.hpp
rfbc84ca r2c8946b 22 22 namespace Storage { 23 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 ThreadLocalGcc = 1 << 4, 31 ThreadLocalC11 = 1 << 5, 32 NumClasses = 6 24 /// Bitflags for storage classes 25 enum { 26 Extern = 1 << 0, 27 Static = 1 << 1, 28 Auto = 1 << 2, 29 Register = 1 << 3, 30 ThreadLocalGcc = 1 << 4, 31 ThreadLocalC11 = 1 << 5, 32 }; 33 34 /// Bitflag type for storage classes 35 struct class_flags { 36 union { 37 unsigned int val; 38 struct { 39 bool is_extern : 1; 40 bool is_static : 1; 41 bool is_auto : 1; 42 bool is_register : 1; 43 bool is_threadlocalGcc : 1; 44 bool is_threadlocalC11 : 1; 45 }; 33 46 }; 34 47 35 /// Bitflag type for storage classes 36 struct class_flags { 37 union { 38 unsigned int val; 39 struct { 40 bool is_extern : 1; 41 bool is_static : 1; 42 bool is_auto : 1; 43 bool is_register : 1; 44 bool is_threadlocalGcc : 1; 45 bool is_threadlocalC11 : 1; 46 }; 48 constexpr class_flags( unsigned int val = 0 ) : val(val) {} 47 49 48 // MakeBitfieldPrint( NumClasses )49 50 bool is_threadlocal_any() { return this->is_threadlocalC11 || this->is_threadlocalGcc; } 51 }; 50 52 51 constexpr class_flags( unsigned int val = 0 ) : val(val) {} 53 using Classes = bitfield<class_flags>; 52 54 53 bool is_threadlocal_any() { return this->is_threadlocalC11 || this->is_threadlocalGcc; } 54 }; 55 } 55 56 56 using Classes = bitfield<class_flags>;57 }58 57 } 59 58
Note: See TracChangeset
for help on using the changeset viewer.