aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic/SourceManager.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-19 07:30:29 +0000
committerChris Lattner <sabre@nondot.org>2009-01-19 07:30:29 +0000
commita90a4d4a0a365f991b92e925436ec63ef4969839 (patch)
treed28a1243a8de11cd76af3e9ddca6faf4896442d6 /include/clang/Basic/SourceManager.h
parent6fda54c19321673965536b0a8f7236f635cf9730 (diff)
some minor cleanups to SourceManager, and eliminate the
SourceManager::getBuffer(SourceLocation) method. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62494 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/SourceManager.h')
-rw-r--r--include/clang/Basic/SourceManager.h10
1 files changed, 2 insertions, 8 deletions
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h
index 629d8ca574..c3c1a69631 100644
--- a/include/clang/Basic/SourceManager.h
+++ b/include/clang/Basic/SourceManager.h
@@ -286,7 +286,7 @@ public:
/// being #included from the specified IncludePosition. This returns 0 on
/// error and translates NULL into standard input.
FileID createFileID(const FileEntry *SourceFile, SourceLocation IncludePos,
- SrcMgr::CharacteristicKind FileCharacter) {
+ SrcMgr::CharacteristicKind FileCharacter) {
const SrcMgr::ContentCache *IR = getContentCache(SourceFile);
if (IR == 0) return FileID(); // Error opening file?
return createFileID(IR, IncludePos, FileCharacter);
@@ -294,8 +294,7 @@ public:
/// createMainFileID - Create the FileID for the main source file.
FileID createMainFileID(const FileEntry *SourceFile,
- SourceLocation IncludePos) {
-
+ SourceLocation IncludePos) {
assert(MainFileID.isInvalid() && "MainFileID already set!");
MainFileID = createFileID(SourceFile, IncludePos, SrcMgr::C_User);
return MainFileID;
@@ -335,11 +334,6 @@ public:
return getContentCache(FID)->getBuffer();
}
- const llvm::MemoryBuffer *getBuffer(SourceLocation Loc) const {
- return getContentCacheForLoc(Loc)->getBuffer();
- }
-
-
/// getBufferData - Return a pointer to the start and end of the character
/// data for the specified FileID.
std::pair<const char*, const char*> getBufferData(SourceLocation Loc) const;