LLVM: lib/DebugInfo/CodeView/SymbolRecordHelpers.cpp Source File (original) (raw)

1

2

3

4

5

6

7

8

10

13

14using namespace llvm;

16

22

25 switch (Sym.kind()) {

26 case SymbolKind::S_GPROC32:

27 case SymbolKind::S_LPROC32:

28 case SymbolKind::S_GPROC32_ID:

29 case SymbolKind::S_LPROC32_ID:

30 case SymbolKind::S_LPROC32_DPC:

31 case SymbolKind::S_LPROC32_DPC_ID: {

33 return Proc.End;

34 }

35 case SymbolKind::S_BLOCK32: {

38 }

39 case SymbolKind::S_THUNK32: {

41 return Thunk.End;

42 }

43 case SymbolKind::S_INLINESITE: {

45 return Site.End;

46 }

47 default:

48 assert(false && "Unknown record type");

49 return 0;

50 }

51}

52

56 switch (Sym.kind()) {

57 case SymbolKind::S_GPROC32:

58 case SymbolKind::S_LPROC32:

59 case SymbolKind::S_GPROC32_ID:

60 case SymbolKind::S_LPROC32_ID:

61 case SymbolKind::S_LPROC32_DPC:

62 case SymbolKind::S_LPROC32_DPC_ID: {

65 }

66 case SymbolKind::S_BLOCK32: {

68 return Block.Parent;

69 }

70 case SymbolKind::S_THUNK32: {

72 return Thunk.Parent;

73 }

74 case SymbolKind::S_INLINESITE: {

77 }

78 default:

79 assert(false && "Unknown record type");

80 return 0;

81 }

82}

83

92 return Symbols.substream(ScopeBegin, EndOffset);

93}

assert(UImm &&(UImm !=~static_cast< T >(0)) &&"Invalid immediate!")

static RecordT createRecord(const CVSymbol &sym)

Definition SymbolRecordHelpers.cpp:17

size_t size() const

size - Get the array size.

ArrayRef< uint8_t > RecordData

static Error deserializeAs(CVSymbol Symbol, T &Record)

VarStreamArray< CVSymbol > CVSymbolArray

CVRecord< SymbolKind > CVSymbol

SymbolRecordKind

Distinguishes individual records in the Symbols subsection of a .debug$S section.

LLVM_ABI uint32_t getScopeEndOffset(const CVSymbol &Symbol)

Given a symbol P for which symbolOpensScope(P) == true, return the corresponding end offset.

Definition SymbolRecordHelpers.cpp:23

LLVM_ABI uint32_t getScopeParentOffset(const CVSymbol &Symbol)

Definition SymbolRecordHelpers.cpp:54

bool symbolOpensScope(SymbolKind Kind)

Return true if this symbol opens a scope.

LLVM_ABI CVSymbolArray limitSymbolArrayToScope(const CVSymbolArray &Symbols, uint32_t ScopeBegin)

Definition SymbolRecordHelpers.cpp:85

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.