[cfe-commits] r46685 - in /cfe/trunk: Basic/SourceManager.cpp include/clang/Basic/SourceLocation.h
Chris Lattner
sabre at nondot.org
Sun Feb 3 00:24:13 PST 2008
Author: lattner
Date: Sun Feb 3 02:24:13 2008
New Revision: 46685
URL: http://llvm.org/viewvc/llvm-project?rev=46685&view=rev
Log:
the macro start and macro end bits in source location are dead, remove them.
Modified:
cfe/trunk/Basic/SourceManager.cpp
cfe/trunk/include/clang/Basic/SourceLocation.h
Modified: cfe/trunk/Basic/SourceManager.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/Basic/SourceManager.cpp?rev=46685&r1=46684&r2=46685&view=diff
==============================================================================
--- cfe/trunk/Basic/SourceManager.cpp (original)
+++ cfe/trunk/Basic/SourceManager.cpp Sun Feb 3 02:24:13 2008
@@ -193,12 +193,12 @@
int PhysDelta = PhysLoc.getRawFilePos() -
LastOne.getPhysicalLoc().getRawFilePos();
if (SourceLocation::isValidMacroPhysOffs(PhysDelta))
- return SourceLocation::getMacroLoc(i, PhysDelta, false, false);
+ return SourceLocation::getMacroLoc(i, PhysDelta);
}
MacroIDs.push_back(MacroIDInfo::get(InstantLoc, PhysLoc));
- return SourceLocation::getMacroLoc(MacroIDs.size()-1, 0, false, false);
+ return SourceLocation::getMacroLoc(MacroIDs.size()-1, 0);
}
/// getBufferData - Return a pointer to the start and end of the character
Modified: cfe/trunk/include/clang/Basic/SourceLocation.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Basic/SourceLocation.h?rev=46685&r1=46684&r2=46685&view=diff
==============================================================================
--- cfe/trunk/include/clang/Basic/SourceLocation.h (original)
+++ cfe/trunk/include/clang/Basic/SourceLocation.h Sun Feb 3 02:24:13 2008
@@ -43,10 +43,8 @@
// MacroID Layout:
// bit 31: 1 -> MacroID, 0 -> FileID (invalid for MacroID)
- // bit 30: 1 -> Start of macro expansion marker.
- MacroStartOfExpansionBit = 30,
- // bit 29: 1 -> End of macro expansion marker.
- MacroEndOfExpansionBit = 29,
+ // bit 29,30: unused.
+
// bits 28...9 -> MacroID number.
MacroIDBits = 20,
// bits 8...0 -> Macro Physical offset
@@ -92,8 +90,7 @@
return -Val < (1 << (MacroPhysOffsBits-1));
}
- static SourceLocation getMacroLoc(unsigned MacroID, int PhysOffs,
- bool isExpansionStart, bool isExpansionEnd){
+ static SourceLocation getMacroLoc(unsigned MacroID, int PhysOffs){
assert(MacroID < (1 << MacroIDBits) && "Too many macros!");
assert(isValidMacroPhysOffs(PhysOffs) && "Physoffs too large!");
@@ -102,8 +99,6 @@
SourceLocation L;
L.ID = (1 << 31) |
- (isExpansionStart << MacroStartOfExpansionBit) |
- (isExpansionEnd << MacroEndOfExpansionBit) |
(MacroID << MacroPhysOffsBits) |
PhysOffs;
return L;
More information about the cfe-commits
mailing list