r215925 - Inline function into only use.

Rafael Espindola rafael.espindola at gmail.com
Mon Aug 18 11:17:32 PDT 2014


Author: rafael
Date: Mon Aug 18 13:17:32 2014
New Revision: 215925

URL: http://llvm.org/viewvc/llvm-project?rev=215925&view=rev
Log:
Inline function into only use.

Modified:
    cfe/trunk/include/clang/Basic/SourceLocation.h
    cfe/trunk/lib/Basic/SourceLocation.cpp

Modified: cfe/trunk/include/clang/Basic/SourceLocation.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceLocation.h?rev=215925&r1=215924&r2=215925&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/SourceLocation.h (original)
+++ cfe/trunk/include/clang/Basic/SourceLocation.h Mon Aug 18 13:17:32 2014
@@ -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.

Modified: cfe/trunk/lib/Basic/SourceLocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/SourceLocation.cpp?rev=215925&r1=215924&r2=215925&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/SourceLocation.cpp (original)
+++ cfe/trunk/lib/Basic/SourceLocation.cpp Mon Aug 18 13:17:32 2014
@@ -132,13 +132,9 @@ const char *FullSourceLoc::getCharacterD
   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 {





More information about the cfe-commits mailing list