44 uint32_t getChildCount()
const override;
45 std::unique_ptr<PDBSymbol> getChildAtIndex(
uint32_t Index)
const override;
46 std::unique_ptr<PDBSymbol> getNext()
override;
47 void reset()
override;
57 std::vector<EnumeratorRecord> Enumerators;
63 NativeEnumEnumEnumerators::NativeEnumEnumEnumerators(
65 : Session(Session), ClassParent(ClassParent) {
70 while (ContinuationIndex) {
73 ContinuationIndex.reset();
80 Enumerators.push_back(Record);
90 uint32_t NativeEnumEnumEnumerators::getChildCount()
const {
91 return Enumerators.size();
94 std::unique_ptr<PDBSymbol>
95 NativeEnumEnumEnumerators::getChildAtIndex(
uint32_t Index)
const {
96 if (Index >= getChildCount())
106 std::unique_ptr<PDBSymbol> NativeEnumEnumEnumerators::getNext() {
107 if (Index >= getChildCount())
110 return getChildAtIndex(Index++);
113 void NativeEnumEnumEnumerators::reset() { Index = 0; }
118 Record(
std::move(Record)) {}
124 UnmodifiedType(&UnmodifiedType),
Modifiers(
std::move(Modifier)) {}
163 std::unique_ptr<IPDBEnumSymbols>
166 return std::make_unique<NullEnumerator<PDBSymbol>>();
193 case SimpleTypeKind::Boolean128:
194 case SimpleTypeKind::Boolean64:
195 case SimpleTypeKind::Boolean32:
196 case SimpleTypeKind::Boolean16:
197 case SimpleTypeKind::Boolean8:
199 case SimpleTypeKind::NarrowCharacter:
200 case SimpleTypeKind::UnsignedCharacter:
201 case SimpleTypeKind::SignedCharacter:
203 case SimpleTypeKind::WideCharacter:
205 case SimpleTypeKind::Character16:
207 case SimpleTypeKind::Character32:
209 case SimpleTypeKind::Int128:
210 case SimpleTypeKind::Int128Oct:
212 case SimpleTypeKind::Int16Short:
214 case SimpleTypeKind::Int32Long:
216 case SimpleTypeKind::Int64Quad:
218 case SimpleTypeKind::UInt128:
219 case SimpleTypeKind::UInt128Oct:
221 case SimpleTypeKind::UInt16Short:
223 case SimpleTypeKind::UInt32Long:
225 case SimpleTypeKind::UInt64Quad:
229 case SimpleTypeKind::Complex16:
230 case SimpleTypeKind::Complex32:
231 case SimpleTypeKind::Complex32PartialPrecision:
232 case SimpleTypeKind::Complex64:
233 case SimpleTypeKind::Complex80:
234 case SimpleTypeKind::Complex128:
236 case SimpleTypeKind::Float16:
237 case SimpleTypeKind::Float32:
238 case SimpleTypeKind::Float32PartialPrecision:
239 case SimpleTypeKind::Float48:
240 case SimpleTypeKind::Float64:
241 case SimpleTypeKind::Float80:
242 case SimpleTypeKind::Float128:
258 return bool(Record->getOptions() &
266 return bool(Record->getOptions() &
274 return bool(Record->getOptions() &
289 return bool(Record->getOptions() &
298 Record->getUnderlyingType());
299 const auto UnderlyingType =
301 return UnderlyingType ? UnderlyingType->getLength() : 0;
322 return bool(Record->getOptions() &
345 Record->getUnderlyingType());
357 return ((
Modifiers->getModifiers() & ModifierOptions::Const) !=
364 return ((
Modifiers->getModifiers() & ModifierOptions::Volatile) !=
371 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)