mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2024-07-21 02:29:22 +00:00
Add MemoryBuffer::getBuffer() -> StringRef.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@79903 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
parent
6aff2fbd56
commit
1464869cb3
@ -14,6 +14,7 @@
|
||||
#ifndef LLVM_SUPPORT_MEMORYBUFFER_H
|
||||
#define LLVM_SUPPORT_MEMORYBUFFER_H
|
||||
|
||||
#include "llvm/ADT/StringRef.h"
|
||||
#include "llvm/Support/DataTypes.h"
|
||||
#include <string>
|
||||
|
||||
@ -42,6 +43,10 @@ public:
|
||||
const char *getBufferEnd() const { return BufferEnd; }
|
||||
size_t getBufferSize() const { return BufferEnd-BufferStart; }
|
||||
|
||||
StringRef getBuffer() const {
|
||||
return StringRef(BufferStart, getBufferSize());
|
||||
}
|
||||
|
||||
/// getBufferIdentifier - Return an identifier for this buffer, typically the
|
||||
/// filename it was read from.
|
||||
virtual const char *getBufferIdentifier() const {
|
||||
|
Loading…
Reference in New Issue
Block a user