aboutsummaryrefslogtreecommitdiff
path: root/clang/lib/Basic/SourceManager.cpp
diff options
context:
space:
mode:
authorArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-08-23 21:02:45 +0000
committerArgyrios Kyrtzidis <akyrtzi@gmail.com>2011-08-23 21:02:45 +0000
commit18c88a96eb243fd4d2ccbf75ab21c2e79702af7d (patch)
tree80f94aed7382b3ffadf7aeb17fa076b1ca905062 /clang/lib/Basic/SourceManager.cpp
parent2797df6a24e9065b37022f922da813a133cfaac2 (diff)
downloadllvm-18c88a96eb243fd4d2ccbf75ab21c2e79702af7d.zip
llvm-18c88a96eb243fd4d2ccbf75ab21c2e79702af7d.tar.gz
llvm-18c88a96eb243fd4d2ccbf75ab21c2e79702af7d.tar.bz2
Remove one SourceManager::isInFileID overload and use isOffsetInFileID for the other.
llvm-svn: 138381
Diffstat (limited to 'clang/lib/Basic/SourceManager.cpp')
-rw-r--r--clang/lib/Basic/SourceManager.cpp24
1 files changed, 0 insertions, 24 deletions
diff --git a/clang/lib/Basic/SourceManager.cpp b/clang/lib/Basic/SourceManager.cpp
index 66ae486..6448147 100644
--- a/clang/lib/Basic/SourceManager.cpp
+++ b/clang/lib/Basic/SourceManager.cpp
@@ -1300,30 +1300,6 @@ unsigned SourceManager::getFileIDSize(FileID FID) const {
return NextOffset - Entry.getOffset() - 1;
}
-bool SourceManager::isInFileID(SourceLocation Loc,
- FileID FID, unsigned offset, unsigned length,
- unsigned *relativeOffset) const {
- assert(!FID.isInvalid());
- if (Loc.isInvalid())
- return false;
-
- unsigned FIDOffs = getSLocEntry(FID).getOffset();
- unsigned start = FIDOffs + offset;
- unsigned end = start + length;
-
- // Make sure offset/length describe a chunk inside the given FileID.
- assert(start < FIDOffs + getFileIDSize(FID));
- assert(end <= FIDOffs + getFileIDSize(FID));
-
- if (Loc.getOffset() >= start && Loc.getOffset() < end) {
- if (relativeOffset)
- *relativeOffset = Loc.getOffset() - start;
- return true;
- }
-
- return false;
-}
-
//===----------------------------------------------------------------------===//
// Other miscellaneous methods.
//===----------------------------------------------------------------------===//