aboutsummaryrefslogtreecommitdiff
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.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/include/clang/Basic/SourceManager.h b/include/clang/Basic/SourceManager.h
index 4c8a805538..260092536e 100644
--- a/include/clang/Basic/SourceManager.h
+++ b/include/clang/Basic/SourceManager.h
@@ -585,6 +585,12 @@ public:
return getSLocEntry(FID).getFile().getContentCache()->OrigEntry;
}
+ /// Returns the FileEntry record for the provided SLocEntry.
+ const FileEntry *getFileEntryForSLocEntry(const SrcMgr::SLocEntry &sloc) const
+ {
+ return sloc.getFile().getContentCache()->OrigEntry;
+ }
+
/// getBufferData - Return a StringRef to the source buffer data for the
/// specified FileID.
///