[cfe-commits] r62495 - in /cfe/trunk: include/clang/Basic/SourceManager.h lib/Basic/SourceManager.cpp
Chris Lattner
sabre at nondot.org
Sun Jan 18 23:32:13 PST 2009
Author: lattner
Date: Mon Jan 19 01:32:13 2009
New Revision: 62495
URL: http://llvm.org/viewvc/llvm-project?rev=62495&view=rev
Log:
SourceManager::getBufferData(SourceLocation) is dead, delete it.
Modified:
cfe/trunk/include/clang/Basic/SourceManager.h
cfe/trunk/lib/Basic/SourceManager.cpp
Modified: cfe/trunk/include/clang/Basic/SourceManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceManager.h?rev=62495&r1=62494&r2=62495&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/SourceManager.h (original)
+++ cfe/trunk/include/clang/Basic/SourceManager.h Mon Jan 19 01:32:13 2009
@@ -334,9 +334,8 @@
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
Modified: cfe/trunk/lib/Basic/SourceManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/SourceManager.cpp?rev=62495&r1=62494&r2=62495&view=diff
==============================================================================
--- cfe/trunk/lib/Basic/SourceManager.cpp (original)
+++ cfe/trunk/lib/Basic/SourceManager.cpp Mon Jan 19 01:32:13 2009
@@ -180,14 +180,8 @@
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);
More information about the cfe-commits
mailing list