|
@@ -15,13 +15,13 @@
|
|
#include "clang/Basic/FileSystemOptions.h"
|
|
#include "clang/Basic/FileSystemOptions.h"
|
|
#include "clang/Basic/DiagnosticOptions.h"
|
|
#include "clang/Basic/DiagnosticOptions.h"
|
|
#include "clang/Lex/HeaderSearchOptions.h"
|
|
#include "clang/Lex/HeaderSearchOptions.h"
|
|
|
|
+#include "clang/Lex/PreprocessorOptions.h"
|
|
#include "clang/StaticAnalyzer/Core/AnalyzerOptions.h"
|
|
#include "clang/StaticAnalyzer/Core/AnalyzerOptions.h"
|
|
#include "clang/Frontend/MigratorOptions.h"
|
|
#include "clang/Frontend/MigratorOptions.h"
|
|
#include "clang/Frontend/CodeGenOptions.h"
|
|
#include "clang/Frontend/CodeGenOptions.h"
|
|
#include "clang/Frontend/DependencyOutputOptions.h"
|
|
#include "clang/Frontend/DependencyOutputOptions.h"
|
|
#include "clang/Frontend/FrontendOptions.h"
|
|
#include "clang/Frontend/FrontendOptions.h"
|
|
#include "clang/Frontend/LangStandard.h"
|
|
#include "clang/Frontend/LangStandard.h"
|
|
-#include "clang/Frontend/PreprocessorOptions.h"
|
|
|
|
#include "clang/Frontend/PreprocessorOutputOptions.h"
|
|
#include "clang/Frontend/PreprocessorOutputOptions.h"
|
|
#include "llvm/ADT/IntrusiveRefCntPtr.h"
|
|
#include "llvm/ADT/IntrusiveRefCntPtr.h"
|
|
#include "llvm/ADT/StringRef.h"
|
|
#include "llvm/ADT/StringRef.h"
|
|
@@ -62,6 +62,9 @@ protected:
|
|
/// Options controlling the \#include directive.
|
|
/// Options controlling the \#include directive.
|
|
IntrusiveRefCntPtr<HeaderSearchOptions> HeaderSearchOpts;
|
|
IntrusiveRefCntPtr<HeaderSearchOptions> HeaderSearchOpts;
|
|
|
|
|
|
|
|
+ /// Options controlling the preprocessor (aside from \#include handling).
|
|
|
|
+ IntrusiveRefCntPtr<PreprocessorOptions> PreprocessorOpts;
|
|
|
|
+
|
|
public:
|
|
public:
|
|
CompilerInvocationBase();
|
|
CompilerInvocationBase();
|
|
|
|
|
|
@@ -81,6 +84,11 @@ public:
|
|
const HeaderSearchOptions &getHeaderSearchOpts() const {
|
|
const HeaderSearchOptions &getHeaderSearchOpts() const {
|
|
return *HeaderSearchOpts;
|
|
return *HeaderSearchOpts;
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ PreprocessorOptions &getPreprocessorOpts() { return *PreprocessorOpts; }
|
|
|
|
+ const PreprocessorOptions &getPreprocessorOpts() const {
|
|
|
|
+ return *PreprocessorOpts;
|
|
|
|
+ }
|
|
};
|
|
};
|
|
|
|
|
|
/// \brief Helper class for holding the data necessary to invoke the compiler.
|
|
/// \brief Helper class for holding the data necessary to invoke the compiler.
|
|
@@ -106,9 +114,6 @@ class CompilerInvocation : public CompilerInvocationBase {
|
|
/// Options controlling the frontend itself.
|
|
/// Options controlling the frontend itself.
|
|
FrontendOptions FrontendOpts;
|
|
FrontendOptions FrontendOpts;
|
|
|
|
|
|
- /// Options controlling the preprocessor (aside from \#include handling).
|
|
|
|
- PreprocessorOptions PreprocessorOpts;
|
|
|
|
-
|
|
|
|
/// Options controlling preprocessed output.
|
|
/// Options controlling preprocessed output.
|
|
PreprocessorOutputOptions PreprocessorOutputOpts;
|
|
PreprocessorOutputOptions PreprocessorOutputOpts;
|
|
|
|
|
|
@@ -192,11 +197,6 @@ public:
|
|
return FrontendOpts;
|
|
return FrontendOpts;
|
|
}
|
|
}
|
|
|
|
|
|
- PreprocessorOptions &getPreprocessorOpts() { return PreprocessorOpts; }
|
|
|
|
- const PreprocessorOptions &getPreprocessorOpts() const {
|
|
|
|
- return PreprocessorOpts;
|
|
|
|
- }
|
|
|
|
-
|
|
|
|
PreprocessorOutputOptions &getPreprocessorOutputOpts() {
|
|
PreprocessorOutputOptions &getPreprocessorOutputOpts() {
|
|
return PreprocessorOutputOpts;
|
|
return PreprocessorOutputOpts;
|
|
}
|
|
}
|