aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Basic/SourceLocation.h
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2007-07-20 18:00:12 +0000
committerChris Lattner <sabre@nondot.org>2007-07-20 18:00:12 +0000
commit31bb8be680ee2facf7fbb3c6c87b9bbd20248328 (patch)
tree98b4ef62ca73a3e8f867efa2deda7b8bd4f57f19 /include/clang/Basic/SourceLocation.h
parent60c3a1ba7a9d7ce31fcf39690631e716c3d356e9 (diff)
improve comments, implement a trivial single-entry cache in
SourceManager::getInstantiationLoc. With this change, every token expanded from a macro doesn't get its own MacroID. :) This reduces # macro IDs in carbon.h from 16805 to 9197 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@40108 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Basic/SourceLocation.h')
-rw-r--r--include/clang/Basic/SourceLocation.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/clang/Basic/SourceLocation.h b/include/clang/Basic/SourceLocation.h
index d107b0bd70..f0dd026184 100644
--- a/include/clang/Basic/SourceLocation.h
+++ b/include/clang/Basic/SourceLocation.h
@@ -28,8 +28,8 @@ public:
FileIDBits = 14,
FilePosBits = 32-1-FileIDBits,
- MacroIDBits = 23,
- MacroPhysOffsBits = 5,
+ MacroIDBits = 19,
+ MacroPhysOffsBits = 9,
MacroLogOffBits = 3
};
@@ -106,7 +106,7 @@ public:
unsigned getMacroLogOffs() const {
assert(isMacroID() && "Is not a macro id!");
- return ID & ((1 << MacroPhysOffsBits)-1);
+ return ID & ((1 << MacroLogOffBits)-1);
}
/// getFileLocWithOffset - Return a source location with the specified offset