Changeset 7a780ad for src/AST/Type.hpp
- Timestamp:
- Apr 18, 2024, 5:19:17 PM (6 months ago)
- Branches:
- master
- Children:
- 38093ae
- Parents:
- 60c5b6d
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/AST/Type.hpp
r60c5b6d r7a780ad 22 22 #include <vector> 23 23 24 #include "BasicKind.hpp" // for BasicKind 24 25 #include "CVQualifiers.hpp" 25 26 #include "Decl.hpp" // for AggregateDecl subclasses … … 114 115 class BasicType final : public Type { 115 116 public: 116 // GENERATED START, DO NOT EDIT 117 // GENERATED BY BasicTypes-gen.cc 118 enum Kind { 119 Bool, 120 Char, 121 SignedChar, 122 UnsignedChar, 123 ShortSignedInt, 124 ShortUnsignedInt, 125 SignedInt, 126 UnsignedInt, 127 LongSignedInt, 128 LongUnsignedInt, 129 LongLongSignedInt, 130 LongLongUnsignedInt, 131 SignedInt128, 132 UnsignedInt128, 133 uFloat16, 134 uFloat16Complex, 135 uFloat32, 136 uFloat32Complex, 137 Float, 138 FloatComplex, 139 uFloat32x, 140 uFloat32xComplex, 141 uFloat64, 142 uFloat64Complex, 143 Double, 144 DoubleComplex, 145 uFloat64x, 146 uFloat64xComplex, 147 uuFloat80, 148 uFloat128, 149 uFloat128Complex, 150 uuFloat128, 151 LongDouble, 152 LongDoubleComplex, 153 uFloat128x, 154 uFloat128xComplex, 155 NUMBER_OF_BASIC_TYPES 156 } kind; 157 // GENERATED END 158 159 /// xxx -- MAX_INTEGER_TYPE should probably be in BasicTypes-gen.cc, rather than hardcoded here 160 enum { MAX_INTEGER_TYPE = UnsignedInt128 }; 117 BasicKind kind; 161 118 162 119 /// string names of basic types; generated to match with Kind 163 120 static const char *typeNames[]; 164 121 165 BasicType( Kind k, CV::Qualifiers q = {}, std::vector<ptr<Attribute>> && as = {} )122 BasicType( BasicKind k, CV::Qualifiers q = {}, std::vector<ptr<Attribute>> && as = {} ) 166 123 : Type(q, std::move(as)), kind(k) {} 167 124 168 125 /// Check if this type represents an integer type 169 bool isInteger() const { return (unsigned)kind <= (unsigned)MAX_INTEGER_TYPE; }126 bool isInteger() const { return kind <= MAX_INTEGER_TYPE; } 170 127 171 128 const Type * accept( Visitor & v ) const override { return v.visit( this ); }
Note: See TracChangeset
for help on using the changeset viewer.