diff options
-rw-r--r-- | clang/include/clang/Basic/SourceLocation.h | 1 | ||||
-rw-r--r-- | clang/lib/Basic/SourceLocation.cpp | 8 |
2 files changed, 2 insertions, 7 deletions
diff --git a/clang/include/clang/Basic/SourceLocation.h b/clang/include/clang/Basic/SourceLocation.h index a4e53f9c606..7aaee1df226 100644 --- a/clang/include/clang/Basic/SourceLocation.h +++ b/clang/include/clang/Basic/SourceLocation.h @@ -292,7 +292,6 @@ public: const char *getCharacterData(bool *Invalid = nullptr) const; - const llvm::MemoryBuffer* getBuffer(bool *Invalid = nullptr) const; /// \brief Return a StringRef to the source buffer data for the /// specified FileID. diff --git a/clang/lib/Basic/SourceLocation.cpp b/clang/lib/Basic/SourceLocation.cpp index 0c06a48c123..6b885a7bc80 100644 --- a/clang/lib/Basic/SourceLocation.cpp +++ b/clang/lib/Basic/SourceLocation.cpp @@ -132,13 +132,9 @@ const char *FullSourceLoc::getCharacterData(bool *Invalid) const { return SrcMgr->getCharacterData(*this, Invalid); } -const llvm::MemoryBuffer* FullSourceLoc::getBuffer(bool *Invalid) const { - assert(isValid()); - return SrcMgr->getBuffer(SrcMgr->getFileID(*this), Invalid); -} - StringRef FullSourceLoc::getBufferData(bool *Invalid) const { - return getBuffer(Invalid)->getBuffer(); + assert(isValid()); + return SrcMgr->getBuffer(SrcMgr->getFileID(*this), Invalid)->getBuffer();; } std::pair<FileID, unsigned> FullSourceLoc::getDecomposedLoc() const { |