@@ -2118,21 +2118,21 @@ class ParenExpr : public Expr {
21182118// /
21192119class  UnaryOperator  final 
21202120    : public Expr,
2121-       private llvm::TrailingObjects<UnaryOperator, FPOptionsOverride > {
2121+       private llvm::TrailingObjects<UnaryOperator, FPOptions > {
21222122  Stmt *Val;
21232123
2124-   size_t  numTrailingObjects (OverloadToken<FPOptionsOverride >) const  {
2124+   size_t  numTrailingObjects (OverloadToken<FPOptions >) const  {
21252125    return  UnaryOperatorBits.HasFPFeatures  ? 1  : 0 ;
21262126  }
21272127
2128-   FPOptionsOverride  &getTrailingFPFeatures () {
2128+   FPOptions  &getTrailingFPFeatures () {
21292129    assert (UnaryOperatorBits.HasFPFeatures );
2130-     return  *getTrailingObjects<FPOptionsOverride >();
2130+     return  *getTrailingObjects<FPOptions >();
21312131  }
21322132
2133-   const  FPOptionsOverride  &getTrailingFPFeatures () const  {
2133+   const  FPOptions  &getTrailingFPFeatures () const  {
21342134    assert (UnaryOperatorBits.HasFPFeatures );
2135-     return  *getTrailingObjects<FPOptionsOverride >();
2135+     return  *getTrailingObjects<FPOptions >();
21362136  }
21372137
21382138public: 
@@ -2141,7 +2141,7 @@ class UnaryOperator final
21412141protected: 
21422142  UnaryOperator (const  ASTContext &Ctx, Expr *input, Opcode opc, QualType type,
21432143                ExprValueKind VK, ExprObjectKind OK, SourceLocation l,
2144-                 bool  CanOverflow, FPOptionsOverride  FPFeatures);
2144+                 bool  CanOverflow, FPOptions  FPFeatures);
21452145
21462146  // / Build an empty unary operator.
21472147  explicit  UnaryOperator (bool  HasFPFeatures, EmptyShell Empty)
@@ -2156,7 +2156,7 @@ class UnaryOperator final
21562156  static  UnaryOperator *Create (const  ASTContext &C, Expr *input, Opcode opc,
21572157                               QualType type, ExprValueKind VK,
21582158                               ExprObjectKind OK, SourceLocation l,
2159-                                bool  CanOverflow, FPOptionsOverride  FPFeatures);
2159+                                bool  CanOverflow, FPOptions  FPFeatures);
21602160
21612161  Opcode getOpcode () const  {
21622162    return  static_cast <Opcode>(UnaryOperatorBits.Opc );
@@ -2182,13 +2182,13 @@ class UnaryOperator final
21822182  //  Get the FP contractability status of this operator. Only meaningful for
21832183  //  operations on floating point types.
21842184  bool  isFPContractableWithinStatement (const  LangOptions &LO) const  {
2185-     return  getFPFeaturesInEffect (LO).allowFPContractWithinStatement ();
2185+     return  getFPFeatures (LO).allowFPContractWithinStatement ();
21862186  }
21872187
21882188  //  Get the FENV_ACCESS status of this operator. Only meaningful for
21892189  //  operations on floating point types.
21902190  bool  isFEnvAccessOn (const  LangOptions &LO) const  {
2191-     return  getFPFeaturesInEffect (LO).getAllowFEnvAccess ();
2191+     return  getFPFeatures (LO).allowFEnvAccess ();
21922192  }
21932193
21942194  // / isPostfix - Return true if this is a postfix operation, like x++.
@@ -2263,25 +2263,18 @@ class UnaryOperator final
22632263
22642264protected: 
22652265  // / Get FPFeatures from trailing storage
2266-   FPOptionsOverride getStoredFPFeatures () const  {
2267-     return  getTrailingFPFeatures ();
2268-   }
2266+   FPOptions getStoredFPFeatures () const  { return  getTrailingFPFeatures (); }
22692267
22702268  // / Set FPFeatures in trailing storage, used only by Serialization
2271-   void  setStoredFPFeatures (FPOptionsOverride  F) { getTrailingFPFeatures () = F; }
2269+   void  setStoredFPFeatures (FPOptions  F) { getTrailingFPFeatures () = F; }
22722270
22732271public: 
22742272  //  Get the FP features status of this operator. Only meaningful for
22752273  //  operations on floating point types.
2276-   FPOptions getFPFeaturesInEffect (const  LangOptions &LO) const  {
2277-     if  (UnaryOperatorBits.HasFPFeatures )
2278-       return  getStoredFPFeatures ().applyOverrides (LO);
2279-     return  FPOptions::defaultWithoutTrailingStorage (LO);
2280-   }
2281-   FPOptionsOverride getFPOptionsOverride () const  {
2274+   FPOptions getFPFeatures (const  LangOptions &LO) const  {
22822275    if  (UnaryOperatorBits.HasFPFeatures )
22832276      return  getStoredFPFeatures ();
2284-     return  FPOptionsOverride ( );
2277+     return  FPOptions::defaultWithoutTrailingStorage (LO );
22852278  }
22862279
22872280  friend  TrailingObjects;
@@ -3640,22 +3633,22 @@ class BinaryOperator : public Expr {
36403633  size_t  offsetOfTrailingStorage () const ;
36413634
36423635  // / Return a pointer to the trailing FPOptions
3643-   FPOptionsOverride  *getTrailingFPFeatures () {
3636+   FPOptions  *getTrailingFPFeatures () {
36443637    assert (BinaryOperatorBits.HasFPFeatures );
3645-     return  reinterpret_cast <FPOptionsOverride  *>(
3646-         reinterpret_cast < char  *>( this ) +  offsetOfTrailingStorage ());
3638+     return  reinterpret_cast <FPOptions  *>(reinterpret_cast < char  *>( this ) + 
3639+                                           offsetOfTrailingStorage ());
36473640  }
3648-   const  FPOptionsOverride  *getTrailingFPFeatures () const  {
3641+   const  FPOptions  *getTrailingFPFeatures () const  {
36493642    assert (BinaryOperatorBits.HasFPFeatures );
3650-     return  reinterpret_cast <const  FPOptionsOverride  *>(
3643+     return  reinterpret_cast <const  FPOptions  *>(
36513644        reinterpret_cast <const  char  *>(this ) + offsetOfTrailingStorage ());
36523645  }
36533646
36543647  // / Build a binary operator, assuming that appropriate storage has been
36553648  // / allocated for the trailing objects when needed.
36563649  BinaryOperator (const  ASTContext &Ctx, Expr *lhs, Expr *rhs, Opcode opc,
36573650                 QualType ResTy, ExprValueKind VK, ExprObjectKind OK,
3658-                  SourceLocation opLoc, FPOptionsOverride  FPFeatures);
3651+                  SourceLocation opLoc, FPOptions  FPFeatures);
36593652
36603653  // / Construct an empty binary operator.
36613654  explicit  BinaryOperator (EmptyShell Empty) : Expr(BinaryOperatorClass, Empty) {
@@ -3668,7 +3661,7 @@ class BinaryOperator : public Expr {
36683661  static  BinaryOperator *Create (const  ASTContext &C, Expr *lhs, Expr *rhs,
36693662                                Opcode opc, QualType ResTy, ExprValueKind VK,
36703663                                ExprObjectKind OK, SourceLocation opLoc,
3671-                                 FPOptionsOverride  FPFeatures);
3664+                                 FPOptions  FPFeatures);
36723665  SourceLocation getExprLoc () const  { return  getOperatorLoc (); }
36733666  SourceLocation getOperatorLoc () const  { return  BinaryOperatorBits.OpLoc ; }
36743667  void  setOperatorLoc (SourceLocation L) { BinaryOperatorBits.OpLoc  = L; }
@@ -3815,48 +3808,40 @@ class BinaryOperator : public Expr {
38153808  bool  hasStoredFPFeatures () const  { return  BinaryOperatorBits.HasFPFeatures ; }
38163809
38173810  // / Get FPFeatures from trailing storage
3818-   FPOptionsOverride  getStoredFPFeatures () const  {
3811+   FPOptions  getStoredFPFeatures () const  {
38193812    assert (hasStoredFPFeatures ());
38203813    return  *getTrailingFPFeatures ();
38213814  }
38223815  // / Set FPFeatures in trailing storage, used only by Serialization
3823-   void  setStoredFPFeatures (FPOptionsOverride  F) {
3816+   void  setStoredFPFeatures (FPOptions  F) {
38243817    assert (BinaryOperatorBits.HasFPFeatures );
38253818    *getTrailingFPFeatures () = F;
38263819  }
38273820
38283821  //  Get the FP features status of this operator. Only meaningful for
38293822  //  operations on floating point types.
3830-   FPOptions getFPFeaturesInEffect (const  LangOptions &LO) const  {
3831-     if  (BinaryOperatorBits.HasFPFeatures )
3832-       return  getStoredFPFeatures ().applyOverrides (LO);
3833-     return  FPOptions::defaultWithoutTrailingStorage (LO);
3834-   }
3835- 
3836-   //  This is used in ASTImporter
3837-   FPOptionsOverride getFPFeatures (const  LangOptions &LO) const  {
3823+   FPOptions getFPFeatures (const  LangOptions &LO) const  {
38383824    if  (BinaryOperatorBits.HasFPFeatures )
38393825      return  getStoredFPFeatures ();
3840-     return  FPOptionsOverride ( );
3826+     return  FPOptions::defaultWithoutTrailingStorage (LO );
38413827  }
38423828
38433829  //  Get the FP contractability status of this operator. Only meaningful for
38443830  //  operations on floating point types.
38453831  bool  isFPContractableWithinStatement (const  LangOptions &LO) const  {
3846-     return  getFPFeaturesInEffect (LO).allowFPContractWithinStatement ();
3832+     return  getFPFeatures (LO).allowFPContractWithinStatement ();
38473833  }
38483834
38493835  //  Get the FENV_ACCESS status of this operator. Only meaningful for
38503836  //  operations on floating point types.
38513837  bool  isFEnvAccessOn (const  LangOptions &LO) const  {
3852-     return  getFPFeaturesInEffect (LO).getAllowFEnvAccess ();
3838+     return  getFPFeatures (LO).allowFEnvAccess ();
38533839  }
38543840
38553841protected: 
38563842  BinaryOperator (const  ASTContext &Ctx, Expr *lhs, Expr *rhs, Opcode opc,
38573843                 QualType ResTy, ExprValueKind VK, ExprObjectKind OK,
3858-                  SourceLocation opLoc, FPOptionsOverride FPFeatures,
3859-                  bool  dead2);
3844+                  SourceLocation opLoc, FPOptions FPFeatures, bool  dead2);
38603845
38613846  // / Construct an empty BinaryOperator, SC is CompoundAssignOperator.
38623847  BinaryOperator (StmtClass SC, EmptyShell Empty) : Expr(SC, Empty) {
@@ -3866,7 +3851,7 @@ class BinaryOperator : public Expr {
38663851  // / Return the size in bytes needed for the trailing objects.
38673852  // / Used to allocate the right amount of storage.
38683853  static  unsigned  sizeOfTrailingObjects (bool  HasFPFeatures) {
3869-     return  HasFPFeatures * sizeof (FPOptionsOverride );
3854+     return  HasFPFeatures * sizeof (FPOptions );
38703855  }
38713856};
38723857
@@ -3888,7 +3873,7 @@ class CompoundAssignOperator : public BinaryOperator {
38883873protected: 
38893874  CompoundAssignOperator (const  ASTContext &C, Expr *lhs, Expr *rhs, Opcode opc,
38903875                         QualType ResType, ExprValueKind VK, ExprObjectKind OK,
3891-                          SourceLocation OpLoc, FPOptionsOverride  FPFeatures,
3876+                          SourceLocation OpLoc, FPOptions  FPFeatures,
38923877                         QualType CompLHSType, QualType CompResultType)
38933878      : BinaryOperator(C, lhs, rhs, opc, ResType, VK, OK, OpLoc, FPFeatures,
38943879                       true ),
@@ -3904,7 +3889,7 @@ class CompoundAssignOperator : public BinaryOperator {
39043889  static  CompoundAssignOperator *
39053890  Create (const  ASTContext &C, Expr *lhs, Expr *rhs, Opcode opc, QualType ResTy,
39063891         ExprValueKind VK, ExprObjectKind OK, SourceLocation opLoc,
3907-          FPOptionsOverride  FPFeatures, QualType CompLHSType = QualType(),
3892+          FPOptions  FPFeatures, QualType CompLHSType = QualType(),
39083893         QualType CompResultType = QualType());
39093894
39103895  //  The two computation types are the type the LHS is converted
0 commit comments