aboutsummaryrefslogtreecommitdiff
path: root/include/clang/Frontend/CompilerInvocation.h
diff options
context:
space:
mode:
authorDouglas Gregor <dgregor@apple.com>2012-10-16 23:40:58 +0000
committerDouglas Gregor <dgregor@apple.com>2012-10-16 23:40:58 +0000
commit57016dda61498294120b1a881d9e6606337b29d9 (patch)
tree5dfc64766b1250929020a9c1bba6347e84c1046b /include/clang/Frontend/CompilerInvocation.h
parent708f69bcc1be715efd1e9f46266a9c1ead184be6 (diff)
Serialize TargetOptions into an AST file, and make sure that we keep
target options around so they can be accessed at any point (rather than keeping them transient). git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166072 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/clang/Frontend/CompilerInvocation.h')
-rw-r--r--include/clang/Frontend/CompilerInvocation.h16
1 files changed, 8 insertions, 8 deletions
diff --git a/include/clang/Frontend/CompilerInvocation.h b/include/clang/Frontend/CompilerInvocation.h
index 30c96cbb33..a58fef1f4b 100644
--- a/include/clang/Frontend/CompilerInvocation.h
+++ b/include/clang/Frontend/CompilerInvocation.h
@@ -52,6 +52,9 @@ class CompilerInvocationBase : public RefCountedBase<CompilerInvocation> {
protected:
/// Options controlling the language variant.
IntrusiveRefCntPtr<LangOptions> LangOpts;
+
+ /// Options controlling the target.
+ IntrusiveRefCntPtr<TargetOptions> TargetOpts;
public:
CompilerInvocationBase();
@@ -59,6 +62,11 @@ public:
LangOptions *getLangOpts() { return LangOpts.getPtr(); }
const LangOptions *getLangOpts() const { return LangOpts.getPtr(); }
+
+ TargetOptions &getTargetOpts() { return *TargetOpts.getPtr(); }
+ const TargetOptions &getTargetOpts() const {
+ return *TargetOpts.getPtr();
+ }
};
/// \brief Helper class for holding the data necessary to invoke the compiler.
@@ -96,9 +104,6 @@ class CompilerInvocation : public CompilerInvocationBase {
/// Options controlling preprocessed output.
PreprocessorOutputOptions PreprocessorOutputOpts;
- /// Options controlling the target.
- TargetOptions TargetOpts;
-
public:
CompilerInvocation() : AnalyzerOpts(new AnalyzerOptions()) {}
@@ -199,11 +204,6 @@ public:
return PreprocessorOutputOpts;
}
- TargetOptions &getTargetOpts() { return TargetOpts; }
- const TargetOptions &getTargetOpts() const {
- return TargetOpts;
- }
-
/// @}
};