]> granicus.if.org Git - clang/commitdiff
SourceManager::getBufferData(SourceLocation) is dead, delete it.
authorChris Lattner <sabre@nondot.org>
Mon, 19 Jan 2009 07:32:13 +0000 (07:32 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 19 Jan 2009 07:32:13 +0000 (07:32 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62495 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/SourceManager.h
lib/Basic/SourceManager.cpp

index c3c1a6963133cd2119bbf55edf5ee839c5ce4767..b60d0dab234990ba1c56d96347509fa023d60e2a 100644 (file)
@@ -334,9 +334,8 @@ public:
     return getContentCache(FID)->getBuffer();
   }
   
-  /// getBufferData - Return a pointer to the start and end of the character
+  /// getBufferData - Return a pointer to the start and end of the source buffer
   /// data for the specified FileID.
-  std::pair<const char*, const char*> getBufferData(SourceLocation Loc) const;
   std::pair<const char*, const char*> getBufferData(FileID FID) const;
   
   /// getIncludeLoc - Return the location of the #include for the specified
index b053b160e1cee7ff1edb68bd1c21a5b3c4dc18fc..989c3ac1fdf4a861a13f759afda763e5b5928c3b 100644 (file)
@@ -180,14 +180,8 @@ SourceLocation SourceManager::getInstantiationLoc(SourceLocation SpellingLoc,
   return SourceLocation::getMacroLoc(MacroIDs.size()-1, 0);
 }
 
-/// getBufferData - Return a pointer to the start and end of the character
-/// data for the specified location.
-std::pair<const char*, const char*> 
-SourceManager::getBufferData(SourceLocation Loc) const {
-  const llvm::MemoryBuffer *Buf = getBuffer(getCanonicalFileID(Loc));
-  return std::make_pair(Buf->getBufferStart(), Buf->getBufferEnd());
-}
-
+/// getBufferData - Return a pointer to the start and end of the source buffer
+/// data for the specified FileID.
 std::pair<const char*, const char*>
 SourceManager::getBufferData(FileID FID) const {
   const llvm::MemoryBuffer *Buf = getBuffer(FID);