diff options
author | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2020-10-14 10:32:00 -0400 |
---|---|---|
committer | Duncan P. N. Exon Smith <dexonsmith@apple.com> | 2020-10-14 22:42:56 -0400 |
commit | 54c1bcab90102481fe43b73f8547d47446ba2163 (patch) | |
tree | 7f4e8d52b72cb4be5b4bb598c3338d444a628700 /clang/lib/Basic/SourceLocation.cpp | |
parent | 32a4ad3b6ce6028a371b028cf06fa5feff9534bf (diff) | |
download | llvm-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.cpp | 2 |
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 { |