summaryrefslogtreecommitdiffstats
path: root/include/clang/Lex
diff options
context:
space:
mode:
authorEric Liu <ioeric@google.com>2018-01-29 13:21:23 +0000
committerEric Liu <ioeric@google.com>2018-01-29 13:21:23 +0000
commitb286bfc45eee9cdb65f43545e8ae08bdf33ef859 (patch)
tree16c37e3bc100c64a79d48375f64ff769cdff2f3c /include/clang/Lex
parent0c08d9830124a75675348b4eeb47256f3da6693d (diff)
[Lexer] Support adding working directory to relative search dir for #include shortening in HeaderSearch.
Reviewers: bkramer Subscribers: mgorny, hintonda, cfe-commits Differential Revision: https://reviews.llvm.org/D42577 git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@323647 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Lex')
-rw-r--r--include/clang/Lex/HeaderSearch.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/clang/Lex/HeaderSearch.h b/include/clang/Lex/HeaderSearch.h
index 14a7198475..4e8d9cba70 100644
--- a/include/clang/Lex/HeaderSearch.h
+++ b/include/clang/Lex/HeaderSearch.h
@@ -693,7 +693,7 @@ public:
/// \brief Retrieve a uniqued framework name.
StringRef getUniqueFrameworkName(StringRef Framework);
-
+
/// \brief Suggest a path by which the specified file could be found, for
/// use in diagnostics to suggest a #include.
///
@@ -702,6 +702,15 @@ public:
std::string suggestPathToFileForDiagnostics(const FileEntry *File,
bool *IsSystem = nullptr);
+ /// \brief Suggest a path by which the specified file could be found, for
+ /// use in diagnostics to suggest a #include.
+ ///
+ /// \param WorkingDir If non-empty, this will be prepended to search directory
+ /// paths that are relative.
+ std::string suggestPathToFileForDiagnostics(llvm::StringRef File,
+ llvm::StringRef WorkingDir,
+ bool *IsSystem = nullptr);
+
void PrintStats();
size_t getTotalMemory() const;