summaryrefslogtreecommitdiffstats
path: root/clang/tools/libclang/CIndexer.h
diff options
context:
space:
mode:
Diffstat (limited to 'clang/tools/libclang/CIndexer.h')
-rw-r--r--clang/tools/libclang/CIndexer.h15
1 files changed, 14 insertions, 1 deletions
diff --git a/clang/tools/libclang/CIndexer.h b/clang/tools/libclang/CIndexer.h
index de7cc88a2c6..f8cb8dc1feb 100644
--- a/clang/tools/libclang/CIndexer.h
+++ b/clang/tools/libclang/CIndexer.h
@@ -29,12 +29,14 @@ namespace clang {
class CIndexer {
bool OnlyLocalDecls;
bool DisplayDiagnostics;
+ unsigned Options; // CXGlobalOptFlags.
llvm::sys::Path ResourcesPath;
std::string WorkingDir;
public:
- CIndexer() : OnlyLocalDecls(false), DisplayDiagnostics(false) { }
+ CIndexer() : OnlyLocalDecls(false), DisplayDiagnostics(false),
+ Options(CXGlobalOpt_None) { }
/// \brief Whether we only want to see "local" declarations (that did not
/// come from a previous precompiled header). If false, we want to see all
@@ -47,6 +49,13 @@ public:
DisplayDiagnostics = Display;
}
+ unsigned getCXGlobalOptFlags() const { return Options; }
+ void setCXGlobalOptFlags(unsigned options) { Options = options; }
+
+ bool isOptEnabled(CXGlobalOptFlags opt) const {
+ return Options & ~unsigned(opt);
+ }
+
/// \brief Get the path of the clang resource files.
std::string getClangResourcesPath();
@@ -79,6 +88,10 @@ public:
bool RunSafely(llvm::CrashRecoveryContext &CRC,
void (*Fn)(void*), void *UserData, unsigned Size = 0);
+ /// \brief Set the thread priority to background.
+ /// FIXME: Move to llvm/Support.
+ void setBackGroundPriority();
+
/// \brief Print libclang's resource usage to standard error.
void PrintLibclangResourceUsage(CXTranslationUnit TU);
}
OpenPOWER on IntegriCloud