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

1

2

3

4

5

6

7

8

10

14

15using namespace llvm;

18

19

21 return Name == "" || Name == "__unnamed" ||

22 Name.ends_with("::") || Name.ends_with("::__unnamed");

23}

24

25

26

34

35 if (!ForwardRef && Scoped && !IsAnon)

40}

41

42template

44 T Deserialized;

46 Deserialized))

47 return std::move(E);

49}

50

51template

53 T Deserialized;

55 Deserialized))

56 return std::move(E);

57

58 ClassOptions Opts = Deserialized.getOptions();

59

61

63

64

65

66 if (!ForwardRef)

67 return TagRecordHash{std::move(Deserialized), ThisRecordHash, 0};

68

70

72 Scoped ? Deserialized.getUniqueName() : Deserialized.getName();

74 return TagRecordHash{std::move(Deserialized), FullHash, ThisRecordHash};

75}

76

77template

79 T Deserialized;

81 Deserialized))

82 return std::move(E);

83 char Buf[4];

86}

87

89 switch (Type.kind()) {

90 case LF_CLASS:

91 case LF_STRUCTURE:

92 case LF_INTERFACE:

94 case LF_UNION:

96 case LF_ENUM:

98 default:

99 assert(false && "Type is not a tag record!");

100 }

103}

104

106 switch (Rec.kind()) {

107 case LF_CLASS:

108 case LF_STRUCTURE:

109 case LF_INTERFACE:

111 case LF_UNION:

113 case LF_ENUM:

115

116 case LF_UDT_SRC_LINE:

118 case LF_UDT_MOD_SRC_LINE:

120

121 default:

122 break;

123 }

124

125

126 JamCRC JC(0U);

129}

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

static GCRegistry::Add< CoreCLRGC > E("coreclr", "CoreCLR-compatible GC")

static Expected< uint32_t > getSourceLineHash(const CVType &Rec)

Definition TpiHashing.cpp:78

static bool isAnonymous(StringRef Name)

Definition TpiHashing.cpp:20

static Expected< TagRecordHash > getTagRecordHashForUdt(const CVType &Rec)

Definition TpiHashing.cpp:52

static uint32_t getHashForUdt(const TagRecord &Rec, ArrayRef< uint8_t > FullRecord)

Definition TpiHashing.cpp:27

ArrayRef - Represent a constant reference to an array (0 or more elements consecutively in memory),...

Tagged union holding either a T or a Error.

LLVM_ABI void update(ArrayRef< uint8_t > Data)

StringRef - Represent a constant reference to a string, i.e.

ArrayRef< uint8_t > data() const

ClassOptions getOptions() const

StringRef getName() const

StringRef getUniqueName() const

static Error deserializeAs(CVType &CVT, T &Record)

CVRecord< TypeLeafKind > CVType

LLVM_ABI uint32_t hashStringV1(StringRef Str)

LLVM_ABI Expected< uint32_t > hashTypeRecord(const llvm::codeview::CVType &Type)

Definition TpiHashing.cpp:105

LLVM_ABI uint32_t hashBufferV8(ArrayRef< uint8_t > Data)

LLVM_ABI Expected< TagRecordHash > hashTagRecord(const codeview::CVType &Type)

Given a CVType referring to a class, structure, union, or enum, compute the hash of its forward decl ...

Definition TpiHashing.cpp:88

void write32le(void *P, uint32_t V)

This is an optimization pass for GlobalISel generic memory operations.

LLVM_ABI std::error_code inconvertibleErrorCode()

The value returned by this function can be returned from convertToErrorCode for Error values where no...

Error make_error(ArgTs &&... Args)

Make a Error instance representing failure using the given error info type.