summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2009-01-19 07:36:42 +0000
committerChris Lattner <sabre@nondot.org>2009-01-19 07:36:42 +0000
commitf809bbdbb827e4d02a6ddc8f0dfa694d0ca17263 (patch)
tree77e1b16130f1743644ee0b6cd7909c7b242db471
parent7e343b2161cc2b20ff088fa4db8e5251a507d16c (diff)
downloadbcm5719-llvm-f809bbdbb827e4d02a6ddc8f0dfa694d0ca17263.tar.gz
bcm5719-llvm-f809bbdbb827e4d02a6ddc8f0dfa694d0ca17263.zip
remove the SourceManager:: and FullSourceLoc::getFileEntryForLoc methods.
llvm-svn: 62496
-rw-r--r--clang/include/clang/Basic/SourceLocation.h1
-rw-r--r--clang/include/clang/Basic/SourceManager.h6
-rw-r--r--clang/lib/Basic/SourceLocation.cpp5
-rw-r--r--clang/lib/CodeGen/CGDebugInfo.cpp2
4 files changed, 1 insertions, 13 deletions
diff --git a/clang/include/clang/Basic/SourceLocation.h b/clang/include/clang/Basic/SourceLocation.h
index e56ce98026b..8def5c5c1a5 100644
--- a/clang/include/clang/Basic/SourceLocation.h
+++ b/clang/include/clang/Basic/SourceLocation.h
@@ -283,7 +283,6 @@ public:
const llvm::MemoryBuffer* getBuffer() const;
const char* getSourceName() const;
- const FileEntry* getFileEntryForLoc() const;
bool isInSystemHeader() const;
diff --git a/clang/include/clang/Basic/SourceManager.h b/clang/include/clang/Basic/SourceManager.h
index b60d0dab234..270fba668e6 100644
--- a/clang/include/clang/Basic/SourceManager.h
+++ b/clang/include/clang/Basic/SourceManager.h
@@ -412,12 +412,6 @@ public:
return FileIDs[ChunkID-1].getContentCache();
}
- /// getFileEntryForLoc - Return the FileEntry record for the spelling loc of
- /// the specified SourceLocation, if one exists.
- const FileEntry* getFileEntryForLoc(SourceLocation Loc) const {
- return getContentCacheForLoc(Loc)->Entry;
- }
-
/// getFileEntryForID - Returns the FileEntry record for the provided FileID.
const FileEntry *getFileEntryForID(FileID FID) const {
return getContentCache(FID)->Entry;
diff --git a/clang/lib/Basic/SourceLocation.cpp b/clang/lib/Basic/SourceLocation.cpp
index 1f5804ff9ca..66ad720bb3b 100644
--- a/clang/lib/Basic/SourceLocation.cpp
+++ b/clang/lib/Basic/SourceLocation.cpp
@@ -94,11 +94,6 @@ const char* FullSourceLoc::getSourceName() const {
return SrcMgr->getSourceName(*this);
}
-const FileEntry* FullSourceLoc::getFileEntryForLoc() const {
- assert(isValid());
- return SrcMgr->getFileEntryForLoc(*this);
-}
-
bool FullSourceLoc::isInSystemHeader() const {
assert(isValid());
return SrcMgr->isInSystemHeader(*this);
diff --git a/clang/lib/CodeGen/CGDebugInfo.cpp b/clang/lib/CodeGen/CGDebugInfo.cpp
index 9cbefa3d069..5e4a95cc0cf 100644
--- a/clang/lib/CodeGen/CGDebugInfo.cpp
+++ b/clang/lib/CodeGen/CGDebugInfo.cpp
@@ -51,7 +51,7 @@ llvm::DICompileUnit CGDebugInfo::getOrCreateCompileUnit(SourceLocation Loc) {
return llvm::DICompileUnit();
SourceManager &SM = M->getContext().getSourceManager();
- const FileEntry *FE = SM.getFileEntryForLoc(Loc);
+ const FileEntry *FE = SM.getFileEntryForID(SM.getCanonicalFileID(Loc));
if (FE == 0) return llvm::DICompileUnit();
// See if this compile unit has been used before.
OpenPOWER on IntegriCloud