diff options
author | Chris Lattner <sabre@nondot.org> | 2007-07-20 18:26:45 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2007-07-20 18:26:45 +0000 |
commit | 45011cf25e756477766231373111aa80b607ebed (patch) | |
tree | 41f2269437fabe7c5c8edc2c58c0332fa40ccb01 /Basic/SourceManager.cpp | |
parent | b1c2df99ba67ec6c29ac7dceaa4eb2c8cda4a017 (diff) |
remove some old cruft
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40111 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'Basic/SourceManager.cpp')
-rw-r--r-- | Basic/SourceManager.cpp | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/Basic/SourceManager.cpp b/Basic/SourceManager.cpp index 09941635da..d05da5d971 100644 --- a/Basic/SourceManager.cpp +++ b/Basic/SourceManager.cpp @@ -188,39 +188,13 @@ SourceLocation SourceManager::getInstantiationLoc(SourceLocation PhysLoc, 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 } |