summaryrefslogtreecommitdiffstats
path: root/include/clang/Basic/LangOptions.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/clang/Basic/LangOptions.h')
-rw-r--r--include/clang/Basic/LangOptions.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/include/clang/Basic/LangOptions.h b/include/clang/Basic/LangOptions.h
index 10635b1122..3f2c4a1649 100644
--- a/include/clang/Basic/LangOptions.h
+++ b/include/clang/Basic/LangOptions.h
@@ -175,12 +175,22 @@ public:
/// \brief Floating point control options
class FPOptions {
public:
- unsigned fp_contract : 1;
-
FPOptions() : fp_contract(0) {}
- FPOptions(const LangOptions &LangOpts) :
- fp_contract(LangOpts.DefaultFPContract) {}
+ explicit FPOptions(unsigned I) : fp_contract(I) {}
+
+ explicit FPOptions(const LangOptions &LangOpts)
+ : fp_contract(LangOpts.DefaultFPContract) {}
+
+ void setFPContractable(bool V) { fp_contract = V; }
+ bool isFPContractable() const { return fp_contract; }
+
+ /// Used to serialize this.
+ unsigned getInt() const { return fp_contract; }
+
+private:
+ /// Adjust BinaryOperator::FPFeatures to match the bit-field size of this.
+ unsigned fp_contract : 1;
};
/// \brief Describes the kind of translation unit being processed.