LLVM: include/llvm/Support/EndianStream.h Source File (original) (raw)

1

2

3

4

5

6

7

8

9

10

11

12

13

14#ifndef LLVM_SUPPORT_ENDIANSTREAM_H

15#define LLVM_SUPPORT_ENDIANSTREAM_H

16

21

22namespace llvm {

24

26

27template <typename value_type>

30 for (const auto orig : values) {

32 os.write((const char *)&value, sizeof(value_type));

33 }

34}

35

36template <typename value_type>

39 os.write((const char *)&value, sizeof(value_type));

40}

41

42template <>

46

47template <>

52

53template <typename value_type>

56 for (value_type v : vals)

58}

59

60template <typename value_type>

63 Out.append((const char *)&V, (const char *)&V + sizeof(value_type));

64}

65

66

74 template <typename value_type> void write(value_type Val) {

76 }

77};

78

79}

80

81}

82}

83

84#endif

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

This file defines the SmallVector class.

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

This class consists of common code factored out of the SmallVector class to reduce code duplication b...

void append(ItTy in_start, ItTy in_end)

Add the specified range to the end of the SmallVector.

This class implements an extremely fast bulk output stream that can only output to a stream.

raw_ostream & write(unsigned char C)

void write_array(raw_ostream &os, ArrayRef< value_type > values, endianness endian)

Definition EndianStream.h:28

value_type byte_swap(value_type value, endianness endian)

void write< float >(raw_ostream &os, float value, endianness endian)

Definition EndianStream.h:43

void write< double >(raw_ostream &os, double value, endianness endian)

Definition EndianStream.h:48

void write(void *memory, value_type value, endianness endian)

Write a value to memory with a particular endianness.

This is an optimization pass for GlobalISel generic memory operations.

To bit_cast(const From &from) noexcept

void write(ArrayRef< value_type > Val)

Definition EndianStream.h:71

void write(value_type Val)

Definition EndianStream.h:74

endianness Endian

Definition EndianStream.h:69

raw_ostream & OS

Definition EndianStream.h:68

Writer(raw_ostream &OS, endianness Endian)

Definition EndianStream.h:70