]> granicus.if.org Git - clang/commitdiff
remove the SourceManager:: and FullSourceLoc::getFileEntryForLoc methods.
authorChris Lattner <sabre@nondot.org>
Mon, 19 Jan 2009 07:36:42 +0000 (07:36 +0000)
committerChris Lattner <sabre@nondot.org>
Mon, 19 Jan 2009 07:36:42 +0000 (07:36 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@62496 91177308-0d34-0410-b5e6-96231b3b80d8

include/clang/Basic/SourceLocation.h
include/clang/Basic/SourceManager.h
lib/Basic/SourceLocation.cpp
lib/CodeGen/CGDebugInfo.cpp

index e56ce98026b9aac03feae43291881f5ea393c1a7..8def5c5c1a5b1bdbef340635b0c254dbd9cb3de2 100644 (file)
@@ -283,7 +283,6 @@ public:
   const llvm::MemoryBuffer* getBuffer() const;
   
   const char* getSourceName() const;
-  const FileEntry* getFileEntryForLoc() const;
 
   bool isInSystemHeader() const;
   
index b60d0dab234990ba1c56d96347509fa023d60e2a..270fba668e60210a88c9b928232e8250564cef08 100644 (file)
@@ -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;
index 1f5804ff9cac72444b6998c1f4d93b2e400417e3..66ad720bb3b6189746f8f92a02d8762f523a64bc 100644 (file)
@@ -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);
index 9cbefa3d0698a367c441af47a3a340b928c65840..5e4a95cc0cf1de7d786624b27fb34035798d2245 100644 (file)
@@ -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.