[cfe-commits] r40111 - /cfe/trunk/Basic/SourceManager.cpp

Chris Lattner sabre at nondot.org
Fri Jul 20 11:26:45 PDT 2007


Author: lattner
Date: Fri Jul 20 13:26:45 2007
New Revision: 40111

URL: http://llvm.org/viewvc/llvm-project?rev=40111&view=rev
Log:
remove some old cruft


Modified:
    cfe/trunk/Basic/SourceManager.cpp

Modified: cfe/trunk/Basic/SourceManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Basic/SourceManager.cpp?rev=40111&r1=40110&r2=40111&view=diff

==============================================================================
--- cfe/trunk/Basic/SourceManager.cpp (original)
+++ cfe/trunk/Basic/SourceManager.cpp Fri Jul 20 13:26:45 2007
@@ -188,39 +188,13 @@
       if (unsigned(PhysDelta) < (1 << SourceLocation::MacroPhysOffsBits))
         return SourceLocation::getMacroLoc(MacroIDs.size()-1,
                                            (unsigned)PhysDelta, 0);
-
     }
   }
   
-  
-  
-  // FIXME: intelligently cache macroid's.
+ 
   MacroIDs.push_back(MacroIDInfo::get(InstantLoc, PhysLoc));
   
   return SourceLocation::getMacroLoc(MacroIDs.size()-1, 0, 0);
-  
-#if 0
-  unsigned InstantiationFileID;
-  
-  // If this is the same instantiation as was requested last time, return this
-  // immediately.
-  if (PhysLoc.getFileID() == LastInstantiationLoc_MacroFID &&
-      InstantLoc == LastInstantiationLoc_InstantLoc) {
-    InstantiationFileID = LastInstantiationLoc_Result;
-  } else {
-    // Add a FileID for this.  FIXME: should cache these!
-    FileIDs.push_back(FileIDInfo::getMacroExpansion(InstantLoc,
-                                                    PhysLoc.getFileID()));
-    InstantiationFileID = FileIDs.size();
-    
-    // Remember this in the single-entry cache for next time.
-    LastInstantiationLoc_MacroFID   = PhysLoc.getFileID();
-    LastInstantiationLoc_InstantLoc = InstantLoc;
-    LastInstantiationLoc_Result     = InstantiationFileID;
-  }
-  return SourceLocation::getMacroLoc(InstantiationFileID, 
-                                     PhysLoc.getRawFilePos());
-#endif
 }
 
 





More information about the cfe-commits mailing list