diff options
Diffstat (limited to 'include/clang/Basic/TargetInfo.h')
-rw-r--r-- | include/clang/Basic/TargetInfo.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/include/clang/Basic/TargetInfo.h b/include/clang/Basic/TargetInfo.h index b73dcb49b5..3e63505dfa 100644 --- a/include/clang/Basic/TargetInfo.h +++ b/include/clang/Basic/TargetInfo.h @@ -62,6 +62,7 @@ enum TargetCXXABI { /// \brief Exposes information about the current target. /// class TargetInfo : public RefCountedBase<TargetInfo> { + TargetOptions *TargetOpts; llvm::Triple Triple; protected: // Target values set by the ctor of the actual target implementation. Default @@ -112,6 +113,16 @@ public: virtual ~TargetInfo(); + /// \brief Retrieve the target options. + TargetOptions &getTargetOpts() const { + assert(TargetOpts && "Missing target options"); + return *TargetOpts; + } + + void setTargetOpts(TargetOptions &TargetOpts) { + this->TargetOpts = &TargetOpts; + } + ///===---- Target Data Type Query Methods -------------------------------===// enum IntType { NoInt = 0, |