diff options
author | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-08-23 21:02:45 +0000 |
---|---|---|
committer | Argyrios Kyrtzidis <akyrtzi@gmail.com> | 2011-08-23 21:02:45 +0000 |
commit | d7cb46c316808169679a8d72c69f02a1e55d78a8 (patch) | |
tree | 6493768332cfec0ab36ad4f0240b477c29fbf123 /lib/Basic/SourceManager.cpp | |
parent | b6c465e17ec37390667223a18a340e8652c212ff (diff) |
Remove one SourceManager::isInFileID overload and use isOffsetInFileID for the other.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@138381 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/Basic/SourceManager.cpp')
-rw-r--r-- | lib/Basic/SourceManager.cpp | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/lib/Basic/SourceManager.cpp b/lib/Basic/SourceManager.cpp index 66ae4861a6..64481476d7 100644 --- a/lib/Basic/SourceManager.cpp +++ b/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. //===----------------------------------------------------------------------===// |