LLVM  8.0.1
Namespaces | Functions
CheckedArithmetic.h File Reference
#include "llvm/ADT/APInt.h"
#include "llvm/ADT/Optional.h"
#include <type_traits>
Include dependency graph for CheckedArithmetic.h:

Go to the source code of this file.

Namespaces

 llvm
 This class represents lattice values for constants.
 

Functions

template<typename T >
std::enable_if< std::is_signed< T >::value, llvm::Optional< T > >::type llvm::checkedAdd (T LHS, T RHS)
 Add two signed integers LHS and RHS. More...
 
template<typename T >
std::enable_if< std::is_signed< T >::value, llvm::Optional< T > >::type llvm::checkedMul (T LHS, T RHS)
 Multiply two signed integers LHS and RHS. More...
 
template<typename T >
std::enable_if< std::is_signed< T >::value, llvm::Optional< T > >::type llvm::checkedMulAdd (T A, T B, T C)
 Multiply A and B, and add C to the resulting product. More...
 
template<typename T >
std::enable_if< std::is_unsigned< T >::value, llvm::Optional< T > >::type llvm::checkedAddUnsigned (T LHS, T RHS)
 Add two unsigned integers LHS and RHS. More...
 
template<typename T >
std::enable_if< std::is_unsigned< T >::value, llvm::Optional< T > >::type llvm::checkedMulUnsigned (T LHS, T RHS)
 Multiply two unsigned integers LHS and RHS. More...
 
template<typename T >
std::enable_if< std::is_unsigned< T >::value, llvm::Optional< T > >::type llvm::checkedMulAddUnsigned (T A, T B, T C)
 Multiply unsigned integers A and B, and add C to the resulting product. More...