aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Frontend')
-rw-r--r--include/clang/Frontend/CompilerInstance.h15
-rw-r--r--include/clang/Frontend/FrontendOptions.h9
2 files changed, 20 insertions, 4 deletions
diff --git a/include/clang/Frontend/CompilerInstance.h b/include/clang/Frontend/CompilerInstance.h
index 492a3c57cd..d6b3afad8c 100644
--- a/include/clang/Frontend/CompilerInstance.h
+++ b/include/clang/Frontend/CompilerInstance.h
@@ -112,7 +112,11 @@ class CompilerInstance : public ModuleLoader {
/// \brief The result of the last module import.
///
ModuleLoadResult LastModuleImportResult;
-
+
+ /// \brief Whether we should (re)build the global module index once we
+ /// have finished with this translation unit.
+ bool BuildGlobalModuleIndex;
+
/// \brief Holds information about the output file.
///
/// If TempFilename is not empty we must rename it to Filename at the end.
@@ -186,6 +190,15 @@ public:
/// setInvocation - Replace the current invocation.
void setInvocation(CompilerInvocation *Value);
+ /// \brief Indicates whether we should (re)build the global module index.
+ bool getBuildGlobalModuleIndex() const { return BuildGlobalModuleIndex; }
+
+ /// \brief Set the flag indicating whether we should (re)build the global
+ /// module index.
+ void setBuildGlobalModuleIndex(bool Build) {
+ BuildGlobalModuleIndex = Build;
+ }
+
/// }
/// @name Forwarding Methods
/// {
diff --git a/include/clang/Frontend/FrontendOptions.h b/include/clang/Frontend/FrontendOptions.h
index 00f1dc46d6..bb6da349ba 100644
--- a/include/clang/Frontend/FrontendOptions.h
+++ b/include/clang/Frontend/FrontendOptions.h
@@ -137,7 +137,9 @@ public:
/// speed up parsing in cases you do
/// not need them (e.g. with code
/// completion).
-
+ unsigned GenerateModuleIndex : 1; ///< Whether to auto-generate a
+ ///< global module index when a new
+ ///< module has been built.
CodeCompleteOptions CodeCompleteOpts;
enum {
@@ -209,8 +211,9 @@ public:
ShowStats(false), ShowTimers(false), ShowVersion(false),
FixWhatYouCan(false), FixOnlyWarnings(false), FixAndRecompile(false),
FixToTemporaries(false), ARCMTMigrateEmitARCErrors(false),
- SkipFunctionBodies(false), ARCMTAction(ARCMT_None),
- ObjCMTAction(ObjCMT_None), ProgramAction(frontend::ParseSyntaxOnly)
+ SkipFunctionBodies(false), GenerateModuleIndex(false),
+ ARCMTAction(ARCMT_None), ObjCMTAction(ObjCMT_None),
+ ProgramAction(frontend::ParseSyntaxOnly)
{}
/// getInputKindForExtension - Return the appropriate input kind for a file