]> granicus.if.org Git - clang/commitdiff
rename getInstantiationLoc to match the scheme of isPhysicalLoc.
authorChris Lattner <sabre@nondot.org>
Fri, 9 Nov 2007 23:59:17 +0000 (23:59 +0000)
committerChris Lattner <sabre@nondot.org>
Fri, 9 Nov 2007 23:59:17 +0000 (23:59 +0000)
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@43969 91177308-0d34-0410-b5e6-96231b3b80d8

Basic/SourceManager.cpp
include/clang/Basic/SourceManager.h

index 74e88c18dcc646f28656ceed0c24a49c3da7b913..03fa203b2e5eb0c3c25bd8e76c725fc367d67a03 100644 (file)
@@ -185,7 +185,7 @@ SourceLocation SourceManager::getInstantiationLoc(SourceLocation PhysLoc,
     
     // The instanitation point and source physloc have to exactly match to reuse
     // (for now).  We could allow "nearby" instantiations in the future.
-    if (LastOne.getInstantiationLoc() != InstantLoc ||
+    if (LastOne.getVirtualLoc() != InstantLoc ||
         LastOne.getPhysicalLoc().getFileID() != PhysLoc.getFileID())
       continue;
   
index b08886efa5e1bf3a10e5241ac046012ea608567c..672a2c18b547ada2c006fb203b014f8ba0dad1bc 100644 (file)
@@ -130,18 +130,18 @@ namespace SrcMgr {
   /// the token came from.  An actual macro SourceLocation stores deltas from
   /// these positions.
   class MacroIDInfo {
-    SourceLocation InstantiationLoc, PhysicalLoc;
+    SourceLocation VirtualLoc, PhysicalLoc;
   public:
-    SourceLocation getInstantiationLoc() const { return InstantiationLoc; }
+    SourceLocation getVirtualLoc() const { return VirtualLoc; }
     SourceLocation getPhysicalLoc() const { return PhysicalLoc; }
     
-    /// get - Return a MacroID for a macro expansion.  IL specifies
-    /// the instantiation location, and PL specifies the physical location
-    /// (where the characters from the token come from).  Both IL and PL refer
-    /// to normal File SLocs.
-    static MacroIDInfo get(SourceLocation IL, SourceLocation PL) {
+    /// get - Return a MacroID for a macro expansion.  VL specifies
+    /// the instantiation location (where the macro is expanded), and PL
+    /// specifies the physical location (where the characters from the token
+    /// come from).  Both VL and PL refer to normal File SLocs.
+    static MacroIDInfo get(SourceLocation VL, SourceLocation PL) {
       MacroIDInfo X;
-      X.InstantiationLoc = IL;
+      X.VirtualLoc = VL;
       X.PhysicalLoc = PL;
       return X;
     }
@@ -291,7 +291,7 @@ public:
     // File locations are both physical and logical.
     if (Loc.isFileID()) return Loc;
 
-    return MacroIDs[Loc.getMacroID()].getInstantiationLoc();
+    return MacroIDs[Loc.getMacroID()].getVirtualLoc();
   }
   
   /// getPhysicalLoc - Given a SourceLocation object, return the physical