40 lines
1.2 KiB
C++
40 lines
1.2 KiB
C++
//===--- OperationKinds.def - Operations Database ---------------*- C++ -*-===//
|
|
//
|
|
// This file enumerates the different kinds of operations that can be
|
|
// performed by various expressions.
|
|
//
|
|
//===----------------------------------------------------------------------===//
|
|
//
|
|
/// @file OperationKinds.def
|
|
///
|
|
/// Macros had one or two arguments:
|
|
///
|
|
/// Name: The name of the operation. Name (prefixed with CK_, UO_ or BO_) will
|
|
/// be the name of the corresponding enumerator (see OperationsKinds.h).
|
|
///
|
|
/// Spelling: A string that provides a canonical spelling for the operation.
|
|
|
|
#ifndef BINARY_OPERATION
|
|
# define BINARY_OPERATION(Name, Spelling)
|
|
#endif
|
|
|
|
//===- Binary Operations -------------------------------------------------===//
|
|
// Operators listed in order of precedence.
|
|
// Note that additions to this should also update the StmtVisitor class.
|
|
|
|
BINARY_OPERATION(Mul, "*")
|
|
BINARY_OPERATION(Div, "/")
|
|
BINARY_OPERATION(Add, "+")
|
|
BINARY_OPERATION(Sub, "-")
|
|
// Relational operators.
|
|
BINARY_OPERATION(LT, "<")
|
|
BINARY_OPERATION(GT, ">")
|
|
BINARY_OPERATION(LE, "<=")
|
|
BINARY_OPERATION(GE, ">=")
|
|
// Equality operators.
|
|
BINARY_OPERATION(EQ, "=")
|
|
BINARY_OPERATION(NE, "!=")
|
|
|
|
#undef CAST_OPERATION
|
|
#undef BINARY_OPERATION
|