From: Rafael Espindola Date: Mon, 18 Aug 2014 18:17:32 +0000 (+0000) Subject: Inline function into only use. X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3bc6e602f71dd2a184d9b0603924097d2a95c242;p=clang Inline function into only use. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@215925 91177308-0d34-0410-b5e6-96231b3b80d8 --- diff --git a/include/clang/Basic/SourceLocation.h b/include/clang/Basic/SourceLocation.h index a4e53f9c60..7aaee1df22 100644 --- a/include/clang/Basic/SourceLocation.h +++ b/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/lib/Basic/SourceLocation.cpp b/lib/Basic/SourceLocation.cpp index 0c06a48c12..6b885a7bc8 100644 --- a/lib/Basic/SourceLocation.cpp +++ b/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 FullSourceLoc::getDecomposedLoc() const {