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

1

2

3

4

5

6

7

8

9

10

11

12

13#ifndef LLVM_SUPPORT_MEMORYBUFFERREF_H

14#define LLVM_SUPPORT_MEMORYBUFFERREF_H

15

17

18namespace llvm {

19

20class MemoryBuffer;

21

25

26public:

30 : Buffer(Buffer), Identifier(Identifier) {}

31

34

38

39

42 return LHS.Buffer.begin() == RHS.Buffer.begin() &&

43 LHS.Buffer.end() == RHS.Buffer.end() &&

44 LHS.Identifier.begin() == RHS.Identifier.begin() &&

45 LHS.Identifier.end() == RHS.Identifier.end();

46 }

47

51 }

52};

53

54}

55

56#endif

MemoryBufferRef(StringRef Buffer, StringRef Identifier)

size_t getBufferSize() const

StringRef getBufferIdentifier() const

const char * getBufferStart() const

StringRef getBuffer() const

friend bool operator==(const MemoryBufferRef &LHS, const MemoryBufferRef &RHS)

Check pointer identity (not value) of identifier and data.

friend bool operator!=(const MemoryBufferRef &LHS, const MemoryBufferRef &RHS)

const char * getBufferEnd() const

MemoryBufferRef()=default

This interface provides simple read-only access to a block of memory, and provides simple methods for...

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

constexpr size_t size() const

size - Get the string size.

This is an optimization pass for GlobalISel generic memory operations.