16#ifndef LLVM_CLANG_AST_INTERP_PRIMITIVES_H
17#define LLVM_CLANG_AST_INTERP_PRIMITIVES_H
51 if constexpr (std::is_signed_v<T>) {
52 return llvm::AddOverflow<T>(A, B, R);
60 if constexpr (std::is_signed_v<T>) {
61 return llvm::SubOverflow<T>(A, B, R);
69 if constexpr (std::is_signed_v<T>) {
70 return llvm::MulOverflow<T>(A, B, R);
71 }
else if constexpr (
sizeof(
T) <
sizeof(
int)) {
74 R =
static_cast<T>(
static_cast<unsigned>(A) *
static_cast<unsigned>(B));
bool CheckMulUB(T A, T B, T &R)
@ BlockAddress
A pointer to an interp::Block.
@ AddrLabelDiff
Difference between two AddrLabelExpr.
@ Number
Just a number, nothing else.
@ ExprAddress
A pointer to an Expr.
@ Address
A pointer to a ValueDecl.
@ LabelAddress
A pointer to a AddrLabelExpr.
@ FunctionAddress
A pointer to a FunctionDecl.
ComparisonCategoryResult Compare(const T &X, const T &Y)
Helper to compare two comparable types.
bool CheckSubUB(T A, T B, T &R)
bool CheckAddUB(T A, T B, T &R)
Top level wrappers for InstallAPI frontend operations.
ComparisonCategoryResult
An enumeration representing the possible results of a three-way comparison.
const FunctionProtoType * T
__builtin_bitreverse32 uint32_t __builtin_riscv_aaddu_u32 __builtin_riscv_asubu_u32 __builtin_elementwise_add_sat __builtin_elementwise_sub_sat int32_t uint32_t uint32_t __builtin_riscv_mhacc_i32 __builtin_riscv_mhaccu_u32 __builtin_riscv_mhaccsu_i32 __builtin_riscv_mulq_i32 __builtin_riscv_mqwacc_i64 uint8_t