Please use GitHub pull requests for new patches. Avoid migrating existing patches. Phabricator shutdown timeline
Changeset View
Changeset View
Standalone View
Standalone View
llvm/lib/DebugInfo/PDB/Native/NativeTypeEnum.cpp
Show First 20 Lines • Show All 57 Lines • ▼ Show 20 Lines | private: | ||||
Optional<TypeIndex> ContinuationIndex; | Optional<TypeIndex> ContinuationIndex; | ||||
uint32_t Index = 0; | uint32_t Index = 0; | ||||
}; | }; | ||||
} // namespace | } // namespace | ||||
NativeEnumEnumEnumerators::NativeEnumEnumEnumerators( | NativeEnumEnumEnumerators::NativeEnumEnumEnumerators( | ||||
NativeSession &Session, const NativeTypeEnum &ClassParent) | NativeSession &Session, const NativeTypeEnum &ClassParent) | ||||
: Session(Session), ClassParent(ClassParent) { | : Session(Session), ClassParent(ClassParent) { | ||||
TpiStream &Tpi = cantFail(Session.getPDBFile().getPDBTpiStream()); | TpiStream &Tpi = llvm_cantFail(Session.getPDBFile().getPDBTpiStream()); | ||||
LazyRandomTypeCollection &Types = Tpi.typeCollection(); | LazyRandomTypeCollection &Types = Tpi.typeCollection(); | ||||
ContinuationIndex = ClassParent.getEnumRecord().FieldList; | ContinuationIndex = ClassParent.getEnumRecord().FieldList; | ||||
while (ContinuationIndex) { | while (ContinuationIndex) { | ||||
CVType FieldList = Types.getType(*ContinuationIndex); | CVType FieldList = Types.getType(*ContinuationIndex); | ||||
assert(FieldList.kind() == LF_FIELDLIST); | assert(FieldList.kind() == LF_FIELDLIST); | ||||
ContinuationIndex.reset(); | ContinuationIndex.reset(); | ||||
cantFail(visitMemberRecordStream(FieldList.data(), *this)); | llvm_cantFail(visitMemberRecordStream(FieldList.data(), *this)); | ||||
} | } | ||||
} | } | ||||
Error NativeEnumEnumEnumerators::visitKnownMember(CVMemberRecord &CVM, | Error NativeEnumEnumEnumerators::visitKnownMember(CVMemberRecord &CVM, | ||||
EnumeratorRecord &Record) { | EnumeratorRecord &Record) { | ||||
Enumerators.push_back(Record); | Enumerators.push_back(Record); | ||||
return Error::success(); | return Error::success(); | ||||
} | } | ||||
▲ Show 20 Lines • Show All 299 Lines • Show Last 20 Lines |