diff options
Diffstat (limited to 'include/clang/Frontend/Utils.h')
-rw-r--r-- | include/clang/Frontend/Utils.h | 17 |
1 files changed, 16 insertions, 1 deletions
diff --git a/include/clang/Frontend/Utils.h b/include/clang/Frontend/Utils.h index 02342c1..e499716 100644 --- a/include/clang/Frontend/Utils.h +++ b/include/clang/Frontend/Utils.h @@ -14,7 +14,10 @@ #ifndef LLVM_CLANG_FRONTEND_UTILS_H #define LLVM_CLANG_FRONTEND_UTILS_H +#include "clang/Basic/Diagnostic.h" #include "llvm/ADT/StringRef.h" +#include "llvm/ADT/ArrayRef.h" +#include "llvm/ADT/IntrusiveRefCntPtr.h" #include "llvm/Support/raw_ostream.h" namespace llvm { @@ -24,6 +27,7 @@ class Triple; namespace clang { class ASTConsumer; class CompilerInstance; +class CompilerInvocation; class Decl; class DependencyOutputOptions; class Diagnostic; @@ -85,12 +89,23 @@ void AttachDependencyFileGen(Preprocessor &PP, /// \param OutputPath - If non-empty, a path to write the header include /// information to, instead of writing to stderr. void AttachHeaderIncludeGen(Preprocessor &PP, bool ShowAllHeaders = false, - llvm::StringRef OutputPath = ""); + llvm::StringRef OutputPath = "", + bool ShowDepth = true); /// CacheTokens - Cache tokens for use with PCH. Note that this requires /// a seekable stream. void CacheTokens(Preprocessor &PP, llvm::raw_fd_ostream* OS); +/// createInvocationFromCommandLine - Construct a compiler invocation object for +/// a command line argument vector. +/// +/// \return A CompilerInvocation, or 0 if none was built for the given +/// argument vector. +CompilerInvocation * +createInvocationFromCommandLine(llvm::ArrayRef<const char *> Args, + llvm::IntrusiveRefCntPtr<Diagnostic> Diags = + llvm::IntrusiveRefCntPtr<Diagnostic>()); + } // end namespace clang #endif |