LLVM  9.0.0svn
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:
This graph shows which files directly or indirectly include this file:

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::checkedSub (T LHS, T RHS)
 Subtract 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...