15 #ifndef LLVM_SUPPORT_CHECKEDARITHMETIC_H 16 #define LLVM_SUPPORT_CHECKEDARITHMETIC_H 21 #include <type_traits> 28 template <
typename T,
typename F>
29 typename std::enable_if<std::is_integral<T>::value &&
sizeof(
T) * 8 <= 64,
uint64_t getZExtValue() const
Get zero extended value.
std::enable_if< std::is_unsigned< T >::value, llvm::Optional< T > >::type checkedMulUnsigned(T LHS, T RHS)
Multiply two unsigned integers LHS and RHS.
This class represents lattice values for constants.
std::enable_if< std::is_signed< T >::value, llvm::Optional< T > >::type checkedAdd(T LHS, T RHS)
Add two signed integers LHS and RHS.
This file implements a class to represent arbitrary precision integral constant values and operations...
int64_t getSExtValue() const
Get sign extended value.
std::enable_if< std::is_signed< T >::value, llvm::Optional< T > >::type checkedMul(T LHS, T RHS)
Multiply two signed integers LHS and RHS.
static GCRegistry::Add< OcamlGC > B("ocaml", "ocaml 3.10-compatible GC")
APInt uadd_ov(const APInt &RHS, bool &Overflow) const
std::enable_if< std::is_unsigned< T >::value, llvm::Optional< T > >::type checkedAddUnsigned(T LHS, T RHS)
Add two unsigned integers LHS and RHS.
Class for arbitrary precision integers.
APInt smul_ov(const APInt &RHS, bool &Overflow) const
APInt umul_ov(const APInt &RHS, bool &Overflow) const
APInt sadd_ov(const APInt &RHS, bool &Overflow) const
std::enable_if< std::is_signed< T >::value, llvm::Optional< T > >::type checkedMulAdd(T A, T B, T C)
Multiply A and B, and add C to the resulting product.
std::enable_if< std::is_unsigned< T >::value, llvm::Optional< T > >::type checkedMulAddUnsigned(T A, T B, T C)
Multiply unsigned integers A and B, and add C to the resulting product.