aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-19 07:32:13 +0000
committerChris Lattner <sabre@nondot.org>2009-01-19 07:32:13 +0000
commit31530bae788dea5c79e72a1f99a56c3f5c6aa36f (patch)
treea56d05becb403217c3d44a2ee67d3270669c0f3e
parenta90a4d4a0a365f991b92e925436ec63ef4969839 (diff)
SourceManager::getBufferData(SourceLocation) is dead, delete it.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62495 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--include/clang/Basic/SourceManager.h3
-rw-r--r--lib/Basic/SourceManager.cpp10
2 files changed, 3 insertions, 10 deletions
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h
index c3c1a69631..b60d0dab23 100644
--- a/include/clang/Basic/SourceManager.h
+++ b/include/clang/Basic/SourceManager.h
@@ -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
diff --git a/lib/Basic/SourceManager.cpp b/lib/Basic/SourceManager.cpp
index b053b160e1..989c3ac1fd 100644
--- a/lib/Basic/SourceManager.cpp
+++ b/lib/Basic/SourceManager.cpp
@@ -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);