summaryrefslogtreecommitdiffstats
path: root/include/clang/Frontend/ASTUnit.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Frontend/ASTUnit.h')
-rw-r--r--include/clang/Frontend/ASTUnit.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/clang/Frontend/ASTUnit.h b/include/clang/Frontend/ASTUnit.h
index a2a1796cd3..d05b7de0dc 100644
--- a/include/clang/Frontend/ASTUnit.h
+++ b/include/clang/Frontend/ASTUnit.h
@@ -54,6 +54,7 @@ class HeaderSearch;
class InputKind;
class MemoryBufferCache;
class Preprocessor;
+class PreprocessorOptions;
class PCHContainerOperations;
class PCHContainerReader;
class TargetInfo;
@@ -97,6 +98,7 @@ private:
IntrusiveRefCntPtr<ASTContext> Ctx;
std::shared_ptr<TargetOptions> TargetOpts;
std::shared_ptr<HeaderSearchOptions> HSOpts;
+ std::shared_ptr<PreprocessorOptions> PPOpts;
IntrusiveRefCntPtr<ASTReader> Reader;
bool HadModuleLoaderFatalFailure;
@@ -516,9 +518,19 @@ public:
}
const LangOptions &getLangOpts() const {
- assert(LangOpts && " ASTUnit does not have language options");
+ assert(LangOpts && "ASTUnit does not have language options");
return *LangOpts;
}
+
+ const HeaderSearchOptions &getHeaderSearchOpts() const {
+ assert(HSOpts && "ASTUnit does not have header search options");
+ return *HSOpts;
+ }
+
+ const PreprocessorOptions &getPreprocessorOpts() const {
+ assert(PPOpts && "ASTUnit does not have preprocessor options");
+ return *PPOpts;
+ }
const FileManager &getFileManager() const { return *FileMgr; }
FileManager &getFileManager() { return *FileMgr; }