55 changes: 0 additions & 55 deletions clang/test/PCH/pragma-floatcontrol.c

This file was deleted.

63 changes: 0 additions & 63 deletions clang/test/Parser/fp-floatcontrol-syntax.cpp

This file was deleted.

13 changes: 1 addition & 12 deletions llvm/include/llvm/IR/IRBuilder.h
Original file line number Diff line number Diff line change
Expand Up @@ -244,8 +244,6 @@ class IRBuilderBase {
/// Get the flags to be applied to created floating point ops
FastMathFlags getFastMathFlags() const { return FMF; }

FastMathFlags &getFastMathFlags() { return FMF; }

/// Clear the fast-math flags.
void clearFastMathFlags() { FMF.clear(); }

Expand Down Expand Up @@ -334,26 +332,17 @@ class IRBuilderBase {
IRBuilderBase &Builder;
FastMathFlags FMF;
MDNode *FPMathTag;
bool IsFPConstrained;
fp::ExceptionBehavior DefaultConstrainedExcept;
RoundingMode DefaultConstrainedRounding;

public:
FastMathFlagGuard(IRBuilderBase &B)
: Builder(B), FMF(B.FMF), FPMathTag(B.DefaultFPMathTag),
IsFPConstrained(B.IsFPConstrained),
DefaultConstrainedExcept(B.DefaultConstrainedExcept),
DefaultConstrainedRounding(B.DefaultConstrainedRounding) {}
: Builder(B), FMF(B.FMF), FPMathTag(B.DefaultFPMathTag) {}

FastMathFlagGuard(const FastMathFlagGuard &) = delete;
FastMathFlagGuard &operator=(const FastMathFlagGuard &) = delete;

~FastMathFlagGuard() {
Builder.FMF = FMF;
Builder.DefaultFPMathTag = FPMathTag;
Builder.IsFPConstrained = IsFPConstrained;
Builder.DefaultConstrainedExcept = DefaultConstrainedExcept;
Builder.DefaultConstrainedRounding = DefaultConstrainedRounding;
}
};

Expand Down