diff options
author | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
---|---|---|
committer | dim <dim@FreeBSD.org> | 2013-04-08 18:45:10 +0000 |
commit | c72c57c9e9b69944e3e009cd5e209634839581d3 (patch) | |
tree | 4fc2f184c499d106f29a386c452b49e5197bf63d /include/clang/Frontend/CompilerInstance.h | |
parent | 5b20025c30d23d521e12c1f33ec8fa6b821952cd (diff) | |
download | FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.zip FreeBSD-src-c72c57c9e9b69944e3e009cd5e209634839581d3.tar.gz |
Vendor import of clang trunk r178860:
http://llvm.org/svn/llvm-project/cfe/trunk@178860
Diffstat (limited to 'include/clang/Frontend/CompilerInstance.h')
-rw-r--r-- | include/clang/Frontend/CompilerInstance.h | 52 |
1 files changed, 35 insertions, 17 deletions
diff --git a/include/clang/Frontend/CompilerInstance.h b/include/clang/Frontend/CompilerInstance.h index 2f3dc3f..0d67462 100644 --- a/include/clang/Frontend/CompilerInstance.h +++ b/include/clang/Frontend/CompilerInstance.h @@ -10,15 +10,15 @@ #ifndef LLVM_CLANG_FRONTEND_COMPILERINSTANCE_H_ #define LLVM_CLANG_FRONTEND_COMPILERINSTANCE_H_ -#include "clang/Frontend/CompilerInvocation.h" #include "clang/Basic/Diagnostic.h" #include "clang/Basic/SourceManager.h" +#include "clang/Frontend/CompilerInvocation.h" #include "clang/Lex/ModuleLoader.h" #include "llvm/ADT/ArrayRef.h" #include "llvm/ADT/DenseMap.h" #include "llvm/ADT/IntrusiveRefCntPtr.h" -#include "llvm/ADT/StringRef.h" #include "llvm/ADT/OwningPtr.h" +#include "llvm/ADT/StringRef.h" #include <cassert> #include <list> #include <string> @@ -94,7 +94,7 @@ class CompilerInstance : public ModuleLoader { /// \brief The semantic analysis object. OwningPtr<Sema> TheSema; - + /// \brief The frontend timer OwningPtr<llvm::Timer> FrontendTimer; @@ -111,8 +111,15 @@ class CompilerInstance : public ModuleLoader { /// \brief The result of the last module import. /// - Module *LastModuleImportResult; - + ModuleLoadResult LastModuleImportResult; + + /// \brief Whether we should (re)build the global module index once we + /// have finished with this translation unit. + bool BuildGlobalModuleIndex; + + /// \brief One or more modules failed to build. + bool ModuleBuildFailed; + /// \brief Holds information about the output file. /// /// If TempFilename is not empty we must rename it to Filename at the end. @@ -186,6 +193,15 @@ public: /// setInvocation - Replace the current invocation. void setInvocation(CompilerInvocation *Value); + /// \brief Indicates whether we should (re)build the global module index. + bool shouldBuildGlobalModuleIndex() const; + + /// \brief Set the flag indicating whether we should (re)build the global + /// module index. + void setBuildGlobalModuleIndex(bool Build) { + BuildGlobalModuleIndex = Build; + } + /// } /// @name Forwarding Methods /// { @@ -479,17 +495,12 @@ public: /// /// \param ShouldCloneClient If Client is non-NULL, specifies whether that /// client should be cloned. - void createDiagnostics(int Argc, const char* const *Argv, - DiagnosticConsumer *Client = 0, + void createDiagnostics(DiagnosticConsumer *Client = 0, bool ShouldOwnClient = true, bool ShouldCloneClient = true); /// Create a DiagnosticsEngine object with a the TextDiagnosticPrinter. /// - /// The \p Argc and \p Argv arguments are used only for logging purposes, - /// when the diagnostic options indicate that the compiler should output - /// logging information. - /// /// If no diagnostic client is provided, this creates a /// DiagnosticConsumer that is owned by the returned diagnostic /// object, if using directly the caller is responsible for @@ -507,8 +518,7 @@ public: /// /// \return The new object on success, or null on failure. static IntrusiveRefCntPtr<DiagnosticsEngine> - createDiagnostics(DiagnosticOptions *Opts, int Argc, - const char* const *Argv, + createDiagnostics(DiagnosticOptions *Opts, DiagnosticConsumer *Client = 0, bool ShouldOwnClient = true, bool ShouldCloneClient = true, @@ -542,7 +552,8 @@ public: bool DisablePCHValidation, bool AllowPCHWithCompilerErrors, Preprocessor &PP, ASTContext &Context, - void *DeserializationListener, bool Preamble); + void *DeserializationListener, bool Preamble, + bool UseGlobalModuleIndex); /// Create a code completion consumer using the invocation; note that this /// will cause the source manager to truncate the input source file at the @@ -645,9 +656,16 @@ public: /// } - virtual Module *loadModule(SourceLocation ImportLoc, ModuleIdPath Path, - Module::NameVisibilityKind Visibility, - bool IsInclusionDirective); + virtual ModuleLoadResult loadModule(SourceLocation ImportLoc, + ModuleIdPath Path, + Module::NameVisibilityKind Visibility, + bool IsInclusionDirective); + + virtual void makeModuleVisible(Module *Mod, + Module::NameVisibilityKind Visibility, + SourceLocation ImportLoc, + bool Complain); + }; } // end namespace clang |