[cfe-commits] r62496 - in /cfe/trunk: include/clang/Basic/SourceLocation.h include/clang/Basic/SourceManager.h lib/Basic/SourceLocation.cpp lib/CodeGen/CGDebugInfo.cpp

Chris Lattner sabre at nondot.org
Sun Jan 18 23:36:42 PST 2009


Author: lattner
Date: Mon Jan 19 01:36:42 2009
New Revision: 62496

URL: http://llvm.org/viewvc/llvm-project?rev=62496&view=rev
Log:
remove the SourceManager:: and FullSourceLoc::getFileEntryForLoc methods.

Modified:
    cfe/trunk/include/clang/Basic/SourceLocation.h
    cfe/trunk/include/clang/Basic/SourceManager.h
    cfe/trunk/lib/Basic/SourceLocation.cpp
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Modified: cfe/trunk/include/clang/Basic/SourceLocation.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceLocation.h?rev=62496&r1=62495&r2=62496&view=diff

==============================================================================
--- cfe/trunk/include/clang/Basic/SourceLocation.h (original)
+++ cfe/trunk/include/clang/Basic/SourceLocation.h Mon Jan 19 01:36:42 2009
@@ -283,7 +283,6 @@
   const llvm::MemoryBuffer* getBuffer() const;
   
   const char* getSourceName() const;
-  const FileEntry* getFileEntryForLoc() const;
 
   bool isInSystemHeader() const;
   

Modified: cfe/trunk/include/clang/Basic/SourceManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceManager.h?rev=62496&r1=62495&r2=62496&view=diff

==============================================================================
--- cfe/trunk/include/clang/Basic/SourceManager.h (original)
+++ cfe/trunk/include/clang/Basic/SourceManager.h Mon Jan 19 01:36:42 2009
@@ -412,12 +412,6 @@
     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;

Modified: cfe/trunk/lib/Basic/SourceLocation.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Basic/SourceLocation.cpp?rev=62496&r1=62495&r2=62496&view=diff

==============================================================================
--- cfe/trunk/lib/Basic/SourceLocation.cpp (original)
+++ cfe/trunk/lib/Basic/SourceLocation.cpp Mon Jan 19 01:36:42 2009
@@ -94,11 +94,6 @@
   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);

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=62496&r1=62495&r2=62496&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Mon Jan 19 01:36:42 2009
@@ -51,7 +51,7 @@
     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.





More information about the cfe-commits mailing list