[cfe-commits] r43969 - in /cfe/trunk: Basic/SourceManager.cpp include/clang/Basic/SourceManager.h
Chris Lattner
sabre at nondot.org
Fri Nov 9 15:59:17 PST 2007
Author: lattner
Date: Fri Nov 9 17:59:17 2007
New Revision: 43969
URL: http://llvm.org/viewvc/llvm-project?rev=43969&view=rev
Log:
rename getInstantiationLoc to match the scheme of isPhysicalLoc.
Modified:
cfe/trunk/Basic/SourceManager.cpp
cfe/trunk/include/clang/Basic/SourceManager.h
Modified: cfe/trunk/Basic/SourceManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Basic/SourceManager.cpp?rev=43969&r1=43968&r2=43969&view=diff
==============================================================================
--- cfe/trunk/Basic/SourceManager.cpp (original)
+++ cfe/trunk/Basic/SourceManager.cpp Fri Nov 9 17:59:17 2007
@@ -185,7 +185,7 @@
// 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;
Modified: cfe/trunk/include/clang/Basic/SourceManager.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceManager.h?rev=43969&r1=43968&r2=43969&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/SourceManager.h (original)
+++ cfe/trunk/include/clang/Basic/SourceManager.h Fri Nov 9 17:59:17 2007
@@ -130,18 +130,18 @@
/// 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 @@
// 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
More information about the cfe-commits
mailing list