summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Support/MemoryBuffer.cpp
diff options
context:
space:
mode:
authorMehdi Amini <mehdi.amini@apple.com>2016-10-01 16:38:28 +0000
committerMehdi Amini <mehdi.amini@apple.com>2016-10-01 16:38:28 +0000
commit99d1b295031ea4e74630914c14f94d919aa8e8dc (patch)
treec7e01596b00004583d6c1df4d7097e7f5fb205b2 /llvm/lib/Support/MemoryBuffer.cpp
parent8b021c382d3e4afdf310ab8bbddd8012c7c9dc93 (diff)
downloadbcm5719-llvm-99d1b295031ea4e74630914c14f94d919aa8e8dc.tar.gz
bcm5719-llvm-99d1b295031ea4e74630914c14f94d919aa8e8dc.zip
Use StringRef for MemoryBuffer identifier API (NFC)
llvm-svn: 283043
Diffstat (limited to 'llvm/lib/Support/MemoryBuffer.cpp')
-rw-r--r--llvm/lib/Support/MemoryBuffer.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/llvm/lib/Support/MemoryBuffer.cpp b/llvm/lib/Support/MemoryBuffer.cpp
index b935cbf1ae7..689343206c5 100644
--- a/llvm/lib/Support/MemoryBuffer.cpp
+++ b/llvm/lib/Support/MemoryBuffer.cpp
@@ -90,9 +90,9 @@ public:
/// tail-allocated data.
void operator delete(void *p) { ::operator delete(p); }
- const char *getBufferIdentifier() const override {
- // The name is stored after the class itself.
- return reinterpret_cast<const char*>(this + 1);
+ StringRef getBufferIdentifier() const override {
+ // The name is stored after the class itself.
+ return StringRef(reinterpret_cast<const char *>(this + 1));
}
BufferKind getBufferKind() const override {
@@ -221,9 +221,9 @@ public:
/// tail-allocated data.
void operator delete(void *p) { ::operator delete(p); }
- const char *getBufferIdentifier() const override {
+ StringRef getBufferIdentifier() const override {
// The name is stored after the class itself.
- return reinterpret_cast<const char *>(this + 1);
+ return StringRef(reinterpret_cast<const char *>(this + 1));
}
BufferKind getBufferKind() const override {
OpenPOWER on IntegriCloud