summaryrefslogtreecommitdiffstats
path: root/clang/lib/Lex/PreprocessingRecord.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'clang/lib/Lex/PreprocessingRecord.cpp')
-rw-r--r--clang/lib/Lex/PreprocessingRecord.cpp13
1 files changed, 7 insertions, 6 deletions
diff --git a/clang/lib/Lex/PreprocessingRecord.cpp b/clang/lib/Lex/PreprocessingRecord.cpp
index 41bb581bb0a..7abd34014d4 100644
--- a/clang/lib/Lex/PreprocessingRecord.cpp
+++ b/clang/lib/Lex/PreprocessingRecord.cpp
@@ -45,22 +45,23 @@ PreprocessingRecord::PreprocessingRecord(SourceManager &SM)
/// \brief Returns a pair of [Begin, End) iterators of preprocessed entities
/// that source range \p Range encompasses.
-std::pair<PreprocessingRecord::iterator, PreprocessingRecord::iterator>
+llvm::iterator_range<PreprocessingRecord::iterator>
PreprocessingRecord::getPreprocessedEntitiesInRange(SourceRange Range) {
if (Range.isInvalid())
- return std::make_pair(iterator(), iterator());
+ return llvm::make_range(iterator(), iterator());
if (CachedRangeQuery.Range == Range) {
- return std::make_pair(iterator(this, CachedRangeQuery.Result.first),
- iterator(this, CachedRangeQuery.Result.second));
+ return llvm::make_range(iterator(this, CachedRangeQuery.Result.first),
+ iterator(this, CachedRangeQuery.Result.second));
}
std::pair<int, int> Res = getPreprocessedEntitiesInRangeSlow(Range);
CachedRangeQuery.Range = Range;
CachedRangeQuery.Result = Res;
-
- return std::make_pair(iterator(this, Res.first), iterator(this, Res.second));
+
+ return llvm::make_range(iterator(this, Res.first),
+ iterator(this, Res.second));
}
static bool isPreprocessedEntityIfInFileID(PreprocessedEntity *PPE, FileID FID,
OpenPOWER on IntegriCloud