LLVM: lib/DebugInfo/PDB/Native/NativeEnumTypes.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

10

19

20using namespace llvm;

23

26 std::vectorcodeview::TypeLeafKind Kinds)

27 : Index(0), Session(PDBSession) {

28 std::optional TI = Types.getFirst();

29 while (TI) {

30 CVType CVT = Types.getType(*TI);

33

35 Matches.push_back(*TI);

36 } else if (K == TypeLeafKind::LF_MODIFIER) {

39 CVType UnmodifiedCVT = Types.getType(ModifiedTI);

40

41

42

44 Matches.push_back(*TI);

45 }

46 }

47 TI = Types.getNext(*TI);

48 }

49}

50

52 std::vectorcodeview::TypeIndex Indices)

53 : Matches(std::move(Indices)), Index(0), Session(PDBSession) {}

54

56 return static_cast<uint32_t>(Matches.size());

57}

58

60 if (N < Matches.size()) {

61 SymIndexId Id = Session.getSymbolCache().findSymbolByTypeIndex(Matches[N]);

62 return Session.getSymbolCache().getSymbolById(Id);

63 }

64 return nullptr;

65}

66

70

Provides amortized O(1) random access to a CodeView type stream.

std::unique_ptr< PDBSymbol > getChildAtIndex(uint32_t Index) const override

Definition NativeEnumTypes.cpp:59

NativeEnumTypes(NativeSession &Session, codeview::LazyRandomTypeCollection &TypeCollection, std::vector< codeview::TypeLeafKind > Kinds)

Definition NativeEnumTypes.cpp:24

void reset() override

Definition NativeEnumTypes.cpp:71

uint32_t getChildCount() const override

Definition NativeEnumTypes.cpp:55

std::unique_ptr< PDBSymbol > getNext() override

Definition NativeEnumTypes.cpp:67

LLVM_ABI bool isUdtForwardRef(CVType CVT)

Given an arbitrary codeview type, determine if it is an LF_STRUCTURE, LF_CLASS, LF_INTERFACE,...

CVRecord< TypeLeafKind > CVType

TypeLeafKind

Duplicate copy of the above enum, but using the official CV names.

LLVM_ABI TypeIndex getModifiedType(const CVType &CVT)

Given a CVType which is assumed to be an LF_MODIFIER, return the TypeIndex of the type that the LF_MO...

This is an optimization pass for GlobalISel generic memory operations.

OutputIt move(R &&Range, OutputIt Out)

Provide wrappers to std::move which take ranges instead of having to pass begin/end explicitly.

bool is_contained(R &&Range, const E &Element)

Returns true if Element is found in Range.

Implement std::hash so that hash_code can be used in STL containers.