LLVM: lib/Support/Hash.cpp Source File (original) (raw)

Go to the documentation of this file.

1

2

3

4

5

6

7

8

9

10

11

12

15

16using namespace llvm;

17

19 if (Name == "FNV-1a")

21

23}

24

26 switch (Algorithm) {

28 return "xxHash64";

30 return "FNV-1a";

31 }

33}

34

37 switch (Algorithm) {

39

42

43 uint32_t Hash = 2166136261u;

44 for (unsigned char C : MangledTypeName) {

45 Hash ^= C;

46 Hash *= 16777619u;

47 }

48 return Hash;

49 }

51}

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

#define llvm_unreachable(msg)

Marks that the current location is not supposed to be reachable.

@ C

The default llvm calling convention, compatible with C.

This is an optimization pass for GlobalISel generic memory operations.

KCFIHashAlgorithm parseKCFIHashAlgorithm(StringRef Name)

Parse a KCFI hash algorithm name.

Definition Hash.cpp:18

StringRef stringifyKCFIHashAlgorithm(KCFIHashAlgorithm Algorithm)

Convert a KCFI hash algorithm enum to its string representation.

Definition Hash.cpp:25

uint32_t getKCFITypeID(StringRef MangledTypeName, KCFIHashAlgorithm Algorithm)

Compute KCFI type ID from mangled type name.

Definition Hash.cpp:35