// Part of the Carbon Language project, under the Apache License v2.0 with LLVM // Exceptions. See /LICENSE for license information. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception // // This is an X-macro header. It does not use `#include` guards, and instead is // designed to be `#include`ed after the x-macro is defined in order for its // inclusion to expand to the desired output. Macro definitions are cleaned up // at the end of this file. // // Supported x-macro is: // - CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(Name) // Defines a builtin function type. #if !defined(CARBON_SEM_IR_BUILTIN_FUNCTION_KIND) #error \ "Must define CARBON_SEM_IR_BUILTIN_FUNCTION_KIND x-macro to use this file." #endif CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(None) // Type factories. CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntMakeType32) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntMakeTypeSigned) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntMakeTypeUnsigned) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(FloatMakeType) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(BoolMakeType) // Integer arithmetic. CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntNegate) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntAdd) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntSub) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntMul) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntDiv) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntMod) // Integer bitwise. CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntComplement) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntAnd) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntOr) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntXor) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntLeftShift) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntRightShift) // Integer comparison. CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntEq) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntNeq) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntLess) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntLessEq) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntGreater) CARBON_SEM_IR_BUILTIN_FUNCTION_KIND(IntGreaterEq) #undef CARBON_SEM_IR_BUILTIN_FUNCTION_KIND