45 uint32_t getChildCount()
const override;
46 std::unique_ptr<PDBSymbol> getChildAtIndex(
uint32_t Index)
const override;
47 std::unique_ptr<PDBSymbol> getNext()
override;
48 void reset()
override;
58 std::vector<EnumeratorRecord> Enumerators;
64 NativeEnumEnumEnumerators::NativeEnumEnumEnumerators(
66 : Session(Session), ClassParent(ClassParent) {
71 while (ContinuationIndex) {
74 ContinuationIndex.reset();
81 Enumerators.push_back(Record);
91 uint32_t NativeEnumEnumEnumerators::getChildCount()
const {
92 return Enumerators.size();
95 std::unique_ptr<PDBSymbol>
96 NativeEnumEnumEnumerators::getChildAtIndex(
uint32_t Index)
const {
97 if (Index >= getChildCount())
107 std::unique_ptr<PDBSymbol> NativeEnumEnumEnumerators::getNext() {
108 if (Index >= getChildCount())
111 return getChildAtIndex(Index++);
114 void NativeEnumEnumEnumerators::reset() { Index = 0; }
119 Record(
std::move(Record)) {}
125 UnmodifiedType(&UnmodifiedType),
Modifiers(
std::move(Modifier)) {}
164 std::unique_ptr<IPDBEnumSymbols>
167 return llvm::make_unique<NullEnumerator<PDBSymbol>>();
194 case SimpleTypeKind::Boolean128:
195 case SimpleTypeKind::Boolean64:
196 case SimpleTypeKind::Boolean32:
197 case SimpleTypeKind::Boolean16:
198 case SimpleTypeKind::Boolean8:
200 case SimpleTypeKind::NarrowCharacter:
201 case SimpleTypeKind::UnsignedCharacter:
202 case SimpleTypeKind::SignedCharacter:
204 case SimpleTypeKind::WideCharacter:
206 case SimpleTypeKind::Character16:
208 case SimpleTypeKind::Character32:
210 case SimpleTypeKind::Int128:
211 case SimpleTypeKind::Int128Oct:
213 case SimpleTypeKind::Int16Short:
215 case SimpleTypeKind::Int32Long:
217 case SimpleTypeKind::Int64Quad:
219 case SimpleTypeKind::UInt128:
220 case SimpleTypeKind::UInt128Oct:
222 case SimpleTypeKind::UInt16Short:
224 case SimpleTypeKind::UInt32Long:
226 case SimpleTypeKind::UInt64Quad:
230 case SimpleTypeKind::Complex16:
231 case SimpleTypeKind::Complex32:
232 case SimpleTypeKind::Complex32PartialPrecision:
233 case SimpleTypeKind::Complex64:
234 case SimpleTypeKind::Complex80:
235 case SimpleTypeKind::Complex128:
237 case SimpleTypeKind::Float16:
238 case SimpleTypeKind::Float32:
239 case SimpleTypeKind::Float32PartialPrecision:
240 case SimpleTypeKind::Float48:
241 case SimpleTypeKind::Float64:
242 case SimpleTypeKind::Float80:
243 case SimpleTypeKind::Float128:
259 return bool(Record->getOptions() &
267 return bool(Record->getOptions() &
275 return bool(Record->getOptions() &
290 return bool(Record->getOptions() &
299 Record->getUnderlyingType());
300 const auto UnderlyingType =
302 return UnderlyingType ? UnderlyingType->getLength() : 0;
323 return bool(Record->getOptions() &
346 Record->getUnderlyingType());
358 return ((
Modifiers->getModifiers() & ModifierOptions::Const) !=
365 return ((
Modifiers->getModifiers() & ModifierOptions::Volatile) !=
372 return ((
Modifiers->getModifiers() & ModifierOptions::Unaligned) !=
bool isVolatileType() const override
void cantFail(Error Err, const char *Msg=nullptr)
Report a fatal error if Err is a failure value.
This class represents lattice values for constants.
StringRef getName() const
std::string getName() const override
SimpleTypeKind getSimpleKind() const
NativeTypeEnum(NativeSession &Session, SymIndexId Id, codeview::TypeIndex TI, codeview::EnumRecord Record)
codeview::LazyRandomTypeCollection & typeCollection()
const codeview::EnumRecord & getEnumRecord() const
NativeTypeEnum * UnmodifiedType
Error visitMemberRecordStream(ArrayRef< uint8_t > FieldList, TypeVisitorCallbacks &Callbacks)
bool hasConstructor() const override
void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, PdbSymbolIdField RecurseIdFields) const override
const NativeTypeBuiltin & getUnderlyingBuiltinType() const
Expected< TpiStream & > getPDBTpiStream()
PDB_SymType getSymTag() const override
PDB_BuiltinType getBuiltinType() const override
SimpleTypeMode getSimpleMode() const
SymIndexId getUnmodifiedTypeId() const override
SymIndexId getTypeId() const override
std::unique_ptr< PDBSymbol > getSymbolById(SymIndexId SymbolId) const
Optional< codeview::ModifierRecord > Modifiers
void dump(raw_ostream &OS, int Indent, PdbSymbolIdField ShowIdFields, PdbSymbolIdField RecurseIdFields) const override
bool isScoped() const override
ArrayRef< uint8_t > data() const
TypeIndex ContinuationIndex
std::unique_ptr< IPDBEnumSymbols > findChildren(PDB_SymType Type) const override
PDB_SymType
These values correspond to the SymTagEnum enumeration, and are documented here: https://msdn.microsoft.com/en-us/library/bkedss5f.aspx.
SymIndexId getSymIndexId() const override
bool isInterfaceUdt() const override
bool isConstType() const override
The instances of the Type class are immutable: once they are created, they are never changed...
static Error visitKnownMember(CVMemberRecord &Record, TypeVisitorCallbacks &Callbacks)
LF_INDEX - Used to chain two large LF_FIELDLIST or LF_METHODLIST records together.
void dumpSymbolField(raw_ostream &OS, StringRef Name, T Value, int Indent)
std::underlying_type< E >::type Underlying(E Val)
Check that Val is in range for E, and return Val cast to E's underlying type.
void dumpSymbolIdField(raw_ostream &OS, StringRef Name, SymIndexId Value, int Indent, const IPDBSession &Session, PdbSymbolIdField FieldId, PdbSymbolIdField ShowFlags, PdbSymbolIdField RecurseFlags)
std::unique_ptr< T > getConcreteSymbolById(SymIndexId SymbolId) const
#define llvm_unreachable(msg)
Marks that the current location is not supposed to be reachable.
static ErrorSuccess success()
Create a success value.
bool isValueUdt() const override
bool hasAssignmentOperator() const override
bool isNested() const override
bool hasNestedTypes() const override
bool hasOverloadedOperator() const override
NativeRawSymbol & getNativeSymbolById(SymIndexId SymbolId) const
SymIndexId findSymbolByTypeIndex(codeview::TypeIndex TI)
bool hasCastOperator() const override
SymbolCache & getSymbolCache()
~NativeTypeEnum() override
PDB_BuiltinType
These values correspond to the Basictype enumeration, and are documented here: https://msdn.microsoft.com/en-us/library/4szdtzc3.aspx.
bool isPacked() const override
assert(ImpDefSCC.getReg()==AMDGPU::SCC &&ImpDefSCC.isDef())
Lightweight error class with error context and mandatory checking.
uint64_t getLength() const override
This class implements an extremely fast bulk output stream that can only output to a stream...
bool isIntrinsic() const override
bool isRefUdt() const override
bool isUnalignedType() const override
Provides amortized O(1) random access to a CodeView type stream.
SymIndexId getOrCreateFieldListMember(codeview::TypeIndex FieldListTI, uint32_t Index, Args &&... ConstructorArgs)