diff options
author | Chris Lattner <sabre@nondot.org> | 2008-02-03 08:24:13 +0000 |
---|---|---|
committer | Chris Lattner <sabre@nondot.org> | 2008-02-03 08:24:13 +0000 |
commit | 15e4ad81c3331c5355446642b060259ff51e5d36 (patch) | |
tree | 7b07b4169b09a908c7a0d1b73d4937dc27ff9662 | |
parent | c7a4ba044b45ed8174d8d50e2c36961236ce510c (diff) | |
download | bcm5719-llvm-15e4ad81c3331c5355446642b060259ff51e5d36.tar.gz bcm5719-llvm-15e4ad81c3331c5355446642b060259ff51e5d36.zip |
the macro start and macro end bits in source location are dead, remove them.
llvm-svn: 46685
-rw-r--r-- | clang/Basic/SourceManager.cpp | 4 | ||||
-rw-r--r-- | clang/include/clang/Basic/SourceLocation.h | 11 |
2 files changed, 5 insertions, 10 deletions
diff --git a/clang/Basic/SourceManager.cpp b/clang/Basic/SourceManager.cpp index 4f9753739ef..73ac2abe26f 100644 --- a/clang/Basic/SourceManager.cpp +++ b/clang/Basic/SourceManager.cpp @@ -193,12 +193,12 @@ SourceLocation SourceManager::getInstantiationLoc(SourceLocation PhysLoc, 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 diff --git a/clang/include/clang/Basic/SourceLocation.h b/clang/include/clang/Basic/SourceLocation.h index d153552dfc5..4cffb350b98 100644 --- a/clang/include/clang/Basic/SourceLocation.h +++ b/clang/include/clang/Basic/SourceLocation.h @@ -43,10 +43,8 @@ public: // 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 @@ public: 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 @@ public: SourceLocation L; L.ID = (1 << 31) | - (isExpansionStart << MacroStartOfExpansionBit) | - (isExpansionEnd << MacroEndOfExpansionBit) | (MacroID << MacroPhysOffsBits) | PhysOffs; return L; |