summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/SourceManager.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Basic/SourceManager.h')
-rw-r--r--include/clang/Basic/SourceManager.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h
index 00c96c3..f82b196 100644
--- a/include/clang/Basic/SourceManager.h
+++ b/include/clang/Basic/SourceManager.h
@@ -646,6 +646,13 @@ class SourceManager : public RefCountedBase<SourceManager> {
// Statistics for -print-stats.
mutable unsigned NumLinearScans, NumBinaryProbes;
+ /// \brief Associates a FileID with its "included/expanded in" decomposed
+ /// location.
+ ///
+ /// Used to cache results from and speed-up \c getDecomposedIncludedLoc
+ /// function.
+ mutable llvm::DenseMap<FileID, std::pair<FileID, unsigned> > IncludedLocMap;
+
/// The key value into the IsBeforeInTUCache table.
typedef std::pair<FileID, FileID> IsBeforeInTUCacheKey;
@@ -1127,6 +1134,10 @@ public:
return getDecomposedSpellingLocSlowCase(E, Offset);
}
+ /// \brief Returns the "included/expanded in" decomposed location of the given
+ /// FileID.
+ std::pair<FileID, unsigned> getDecomposedIncludedLoc(FileID FID) const;
+
/// \brief Returns the offset from the start of the file that the
/// specified SourceLocation represents.
///
OpenPOWER on IntegriCloud