diff options
Diffstat (limited to 'llvm/include/llvm/IR/FPEnv.h')
-rw-r--r-- | llvm/include/llvm/IR/FPEnv.h | 22 |
1 files changed, 4 insertions, 18 deletions
diff --git a/llvm/include/llvm/IR/FPEnv.h b/llvm/include/llvm/IR/FPEnv.h index a1e0665d41128..f00cb735932f6 100644 --- a/llvm/include/llvm/IR/FPEnv.h +++ b/llvm/include/llvm/IR/FPEnv.h @@ -15,27 +15,14 @@ #ifndef LLVM_IR_FLOATINGPOINT_H #define LLVM_IR_FLOATINGPOINT_H +#include "llvm/ADT/FloatingPointMode.h" #include "llvm/ADT/Optional.h" -#include "llvm/ADT/StringRef.h" -#include <stdint.h> namespace llvm { +class StringRef; namespace fp { -/// Rounding mode used for floating point operations. -/// -/// Each of these values correspond to some metadata argument value of a -/// constrained floating point intrinsic. See the LLVM Language Reference Manual -/// for details. -enum RoundingMode : uint8_t { - rmDynamic, ///< This corresponds to "fpround.dynamic". - rmToNearest, ///< This corresponds to "fpround.tonearest". - rmDownward, ///< This corresponds to "fpround.downward". - rmUpward, ///< This corresponds to "fpround.upward". - rmTowardZero ///< This corresponds to "fpround.tozero". -}; - /// Exception behavior used for floating point operations. /// /// Each of these values correspond to some metadata argument value of a @@ -52,11 +39,11 @@ enum ExceptionBehavior : uint8_t { /// Returns a valid RoundingMode enumerator when given a string /// that is valid as input in constrained intrinsic rounding mode /// metadata. -Optional<fp::RoundingMode> StrToRoundingMode(StringRef); +Optional<RoundingMode> StrToRoundingMode(StringRef); /// For any RoundingMode enumerator, returns a string valid as input in /// constrained intrinsic rounding mode metadata. -Optional<StringRef> RoundingModeToStr(fp::RoundingMode); +Optional<StringRef> RoundingModeToStr(RoundingMode); /// Returns a valid ExceptionBehavior enumerator when given a string /// valid as input in constrained intrinsic exception behavior metadata. @@ -65,6 +52,5 @@ Optional<fp::ExceptionBehavior> StrToExceptionBehavior(StringRef); /// For any ExceptionBehavior enumerator, returns a string valid as /// input in constrained intrinsic exception behavior metadata. Optional<StringRef> ExceptionBehaviorToStr(fp::ExceptionBehavior); - } #endif |