46 std::unique_ptr<PDBSymbol>
getNext()
override;
47 void reset()
override;
57 std::vector<EnumeratorRecord> Enumerators;
58 std::optional<TypeIndex> ContinuationIndex;
63NativeEnumEnumEnumerators::NativeEnumEnumEnumerators(
69 ContinuationIndex =
ClassParent.getEnumRecord().FieldList;
70 while (ContinuationIndex) {
71 CVType FieldListCVT =
Types.getType(*ContinuationIndex);
73 ContinuationIndex.reset();
75 cantFail(TypeDeserializer::deserializeAs<FieldListRecord>(FieldListCVT,
83 Enumerators.push_back(
Record);
87Error NativeEnumEnumEnumerators::visitKnownMember(
89 ContinuationIndex =
Record.ContinuationIndex;
93uint32_t NativeEnumEnumEnumerators::getChildCount()
const {
94 return Enumerators.size();
97std::unique_ptr<PDBSymbol>
98NativeEnumEnumEnumerators::getChildAtIndex(
uint32_t Index)
const {
99 if (Index >= getChildCount())
109std::unique_ptr<PDBSymbol> NativeEnumEnumEnumerators::getNext() {
110 if (Index >= getChildCount())
113 return getChildAtIndex(Index++);
116void NativeEnumEnumEnumerators::reset() {
Index = 0; }
166std::unique_ptr<IPDBEnumSymbols>
169 return std::make_unique<NullEnumerator<PDBSymbol>>();
190 if (!Underlying.isSimple() ||
191 Underlying.getSimpleMode() != SimpleTypeMode::Direct) {
195 switch (Underlying.getSimpleKind()) {
196 case SimpleTypeKind::Boolean128:
197 case SimpleTypeKind::Boolean64:
198 case SimpleTypeKind::Boolean32:
199 case SimpleTypeKind::Boolean16:
200 case SimpleTypeKind::Boolean8:
202 case SimpleTypeKind::NarrowCharacter:
203 case SimpleTypeKind::UnsignedCharacter:
204 case SimpleTypeKind::SignedCharacter:
206 case SimpleTypeKind::WideCharacter:
208 case SimpleTypeKind::Character16:
210 case SimpleTypeKind::Character32:
212 case SimpleTypeKind::Character8:
214 case SimpleTypeKind::Int128:
215 case SimpleTypeKind::Int128Oct:
216 case SimpleTypeKind::Int16:
217 case SimpleTypeKind::Int16Short:
218 case SimpleTypeKind::Int32:
219 case SimpleTypeKind::Int32Long:
220 case SimpleTypeKind::Int64:
221 case SimpleTypeKind::Int64Quad:
223 case SimpleTypeKind::UInt128:
224 case SimpleTypeKind::UInt128Oct:
225 case SimpleTypeKind::UInt16:
226 case SimpleTypeKind::UInt16Short:
227 case SimpleTypeKind::UInt32:
228 case SimpleTypeKind::UInt32Long:
229 case SimpleTypeKind::UInt64:
230 case SimpleTypeKind::UInt64Quad:
232 case SimpleTypeKind::HResult:
234 case SimpleTypeKind::Complex16:
235 case SimpleTypeKind::Complex32:
236 case SimpleTypeKind::Complex32PartialPrecision:
237 case SimpleTypeKind::Complex64:
238 case SimpleTypeKind::Complex80:
239 case SimpleTypeKind::Complex128:
241 case SimpleTypeKind::Float16:
242 case SimpleTypeKind::Float32:
243 case SimpleTypeKind::Float32PartialPrecision:
244 case SimpleTypeKind::Float48:
245 case SimpleTypeKind::Float64:
246 case SimpleTypeKind::Float80:
247 case SimpleTypeKind::Float128:
303 Record->getUnderlyingType());
304 const auto UnderlyingType =
306 return UnderlyingType ? UnderlyingType->getLength() : 0;
350 Record->getUnderlyingType());
362 return ((
Modifiers->getModifiers() & ModifierOptions::Const) !=
363 ModifierOptions::None);
369 return ((
Modifiers->getModifiers() & ModifierOptions::Volatile) !=
370 ModifierOptions::None);
376 return ((
Modifiers->getModifiers() & ModifierOptions::Unaligned) !=
377 ModifierOptions::None);
static Error visitKnownMember(CVMemberRecord &Record, TypeVisitorCallbacks &Callbacks)
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Lightweight error class with error context and mandatory checking.
static ErrorSuccess success()
Create a success value.
StringRef getName() const
The instances of the Type class are immutable: once they are created, they are never changed.
Provides amortized O(1) random access to a CodeView type stream.
LF_INDEX - Used to chain two large LF_FIELDLIST or LF_METHODLIST records together.
virtual uint32_t getChildCount() const=0
virtual ChildTypePtr getNext()=0
virtual ChildTypePtr getChildAtIndex(uint32_t Index) const=0
std::unique_ptr< T > getConcreteSymbolById(SymIndexId SymbolId) const
SymIndexId getSymIndexId() const override
void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, PdbSymbolIdField RecurseIdFields) const override
SymbolCache & getSymbolCache()
bool isVolatileType() const override
bool isScoped() const override
bool hasOverloadedOperator() const override
bool isIntrinsic() const override
bool isPacked() const override
std::string getName() const override
void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, PdbSymbolIdField RecurseIdFields) const override
bool hasAssignmentOperator() const override
bool isNested() const override
bool isValueUdt() const override
bool isUnalignedType() const override
bool isInterfaceUdt() const override
std::unique_ptr< IPDBEnumSymbols > findChildren(PDB_SymType Type) const override
bool hasCastOperator() const override
PDB_BuiltinType getBuiltinType() const override
bool hasConstructor() const override
SymIndexId getTypeId() const override
bool isConstType() const override
const NativeTypeBuiltin & getUnderlyingBuiltinType() const
bool hasNestedTypes() const override
PDB_SymType getSymTag() const override
SymIndexId getUnmodifiedTypeId() const override
std::optional< codeview::ModifierRecord > Modifiers
~NativeTypeEnum() override
NativeTypeEnum * UnmodifiedType
uint64_t getLength() const override
bool isRefUdt() const override
NativeTypeEnum(NativeSession &Session, SymIndexId Id, codeview::TypeIndex TI, codeview::EnumRecord Record)
Expected< TpiStream & > getPDBTpiStream()
SymIndexId getOrCreateFieldListMember(codeview::TypeIndex FieldListTI, uint32_t Index, Args &&... ConstructorArgs)
std::unique_ptr< PDBSymbol > getSymbolById(SymIndexId SymbolId) const
SymIndexId findSymbolByTypeIndex(codeview::TypeIndex TI) const
NativeRawSymbol & getNativeSymbolById(SymIndexId SymbolId) const
codeview::LazyRandomTypeCollection & typeCollection()
This class implements an extremely fast bulk output stream that can only output to a stream.
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
@ HasConstructorOrDestructor
@ HasOverloadedAssignmentOperator
Error visitMemberRecordStream(ArrayRef< uint8_t > FieldList, TypeVisitorCallbacks &Callbacks)
void dumpSymbolField(raw_ostream &OS, StringRef Name, T Value, int Indent)
PDB_BuiltinType
These values correspond to the Basictype enumeration, and are documented here: https://msdn....
PDB_SymType
These values correspond to the SymTagEnum enumeration, and are documented here: https://msdn....
void dumpSymbolIdField(raw_ostream &OS, StringRef Name, SymIndexId Value, int Indent, const IPDBSession &Session, PdbSymbolIdField FieldId, PdbSymbolIdField ShowFlags, PdbSymbolIdField RecurseFlags)
This is an optimization pass for GlobalISel generic memory operations.
void cantFail(Error Err, const char *Msg=nullptr)
Report a fatal error if Err is a failure value.
OutputIt move(R &&Range, OutputIt Out)
Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.
Implement std::hash so that hash_code can be used in STL containers.