aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/SourceManager.cpp
diff options
context:
space:
mode:
authorHaojian Wu <hokein.wu@gmail.com>2022-10-07 14:04:54 +0200
committerHaojian Wu <hokein.wu@gmail.com>2022-10-07 14:24:31 +0200
commitd779356043a895280d0880551ef33d663fe36c7e (patch)
tree0ea4e0d9c7f026c7dece8ad88365617eb64b24f3 /clang/lib/Basic/SourceManager.cpp
parent551a242ceefea90f014edf68919b2015ddfdc103 (diff)
downloadllvm-d779356043a895280d0880551ef33d663fe36c7e.zip
llvm-d779356043a895280d0880551ef33d663fe36c7e.tar.gz
llvm-d779356043a895280d0880551ef33d663fe36c7e.tar.bz2
[SourceManager] Fix the incorrect counting stats in getFileIDLoaded.
We were double-counting the number of binary search FileID scans.
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
-rw-r--r--clang/lib/Basic/SourceManager.cpp2
1 files changed, 0 insertions, 2 deletions
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp
index f82df59..7229561 100644
--- a/clang/lib/Basic/SourceManager.cpp
+++ b/clang/lib/Basic/SourceManager.cpp
@@ -906,8 +906,6 @@ FileID SourceManager::getFileIDLoaded(SourceLocation::UIntTy SLocOffset) const {
if (Invalid)
return FileID(); // invalid entry.
- ++NumProbes;
-
if (E.getOffset() > SLocOffset) {
if (GreaterIndex == MiddleIndex) {
assert(0 && "binary search missed the entry");