aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/SourceLocation.cpp
diff options
context:
space:
mode:
authorDuncan P. N. Exon Smith <dexonsmith@apple.com>2020-10-14 10:32:00 -0400
committerDuncan P. N. Exon Smith <dexonsmith@apple.com>2020-10-14 22:42:56 -0400
commit54c1bcab90102481fe43b73f8547d47446ba2163 (patch)
tree7f4e8d52b72cb4be5b4bb598c3338d444a628700 /clang/lib/Basic/SourceLocation.cpp
parent32a4ad3b6ce6028a371b028cf06fa5feff9534bf (diff)
downloadllvm-54c1bcab90102481fe43b73f8547d47446ba2163.zip
llvm-54c1bcab90102481fe43b73f8547d47446ba2163.tar.gz
llvm-54c1bcab90102481fe43b73f8547d47446ba2163.tar.bz2
clang/Basic: Stop using SourceManager::getBuffer, NFC
Update clang/lib/Basic to stop relying on a `MemoryBuffer*`, using the `MemoryBufferRef` from `getBufferOrNone` or `getBufferOrFake` instead of `getBuffer`. Differential Revision: https://reviews.llvm.org/D89394
Diffstat (limited to 'clang/lib/Basic/SourceLocation.cpp')
-rw-r--r--clang/lib/Basic/SourceLocation.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/clang/lib/Basic/SourceLocation.cpp b/clang/lib/Basic/SourceLocation.cpp
index c1fa406..8cb0899 100644
--- a/clang/lib/Basic/SourceLocation.cpp
+++ b/clang/lib/Basic/SourceLocation.cpp
@@ -245,7 +245,7 @@ const char *FullSourceLoc::getCharacterData(bool *Invalid) const {
StringRef FullSourceLoc::getBufferData(bool *Invalid) const {
assert(isValid());
- return SrcMgr->getBuffer(SrcMgr->getFileID(*this), Invalid)->getBuffer();
+ return SrcMgr->getBufferData(SrcMgr->getFileID(*this), Invalid);
}
std::pair<FileID, unsigned> FullSourceLoc::getDecomposedLoc() const {