clang 22.0.0git
CGExprComplex.cpp File Reference
#include "CGDebugInfo.h"
#include "CGOpenMPRuntime.h"
#include "CodeGenFunction.h"
#include "CodeGenModule.h"
#include "ConstantEmitter.h"
#include "clang/AST/StmtVisitor.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/IR/Metadata.h"

Go to the source code of this file.

Namespaces

namespace  llvm
 Diagnostic wrappers for TextAPI types for error reporting.

Macros

#define HANDLEBINOP(OP)
#define HANDLE_BINOP(OP)

Typedefs

typedef CodeGenFunction::ComplexPairTy ComplexPairTy
typedef ComplexPairTy(ComplexExprEmitter::* CompoundFunc) (const ComplexExprEmitter::BinOpInfo &)

Functions

static const ComplexTypegetComplexType (QualType type)
 Return the complex type that we are meant to emit.
static StringRef getComplexMultiplyLibCallName (llvm::Type *Ty)
 Lookup the libcall name for a given floating point type complex multiply.
static llvm::ValueEmitllvmFAbs (CodeGenFunction &CGF, llvm::Value *Value)
static CompoundFunc getComplexOp (BinaryOperatorKind Op)

Macro Definition Documentation

◆ HANDLE_BINOP

#define HANDLE_BINOP ( OP)
Value:
case BO_##OP: \
return EmitBin##OP(EmitBinOps(BO, PromotionType));

◆ HANDLEBINOP

#define HANDLEBINOP ( OP)
Value:
ComplexPairTy VisitBin##OP(const BinaryOperator *E) { \
QualType promotionTy = \
getPromotionType(E->getStoredFPFeaturesOrDefault(), E->getType(), \
(E->getOpcode() == BinaryOperatorKind::BO_Div && \
ComplexPairTy result = EmitBin##OP(EmitBinOps(E, promotionTy)); \
if (!promotionTy.isNull()) \
result = CGF.EmitUnPromotedValue(result, E->getType()); \
return result; \
}
CodeGenFunction::ComplexPairTy ComplexPairTy
A builtin binary operation expression such as "x + y" or "x <= y".
Definition Expr.h:3974
FPOptionsOverride getStoredFPFeaturesOrDefault() const
Get the store FPOptionsOverride or default if not stored.
Definition Expr.h:4181
Expr * getRHS() const
Definition Expr.h:4026
Opcode getOpcode() const
Definition Expr.h:4019
QualType getType() const
Definition Expr.h:144
A (possibly-)qualified type.
Definition TypeBase.h:937
bool isNull() const
Return true if this QualType doesn't point to a type yet.
Definition TypeBase.h:1004
bool isAnyComplexType() const
Definition TypeBase.h:8657

Definition at line 343 of file CGExprComplex.cpp.

Typedef Documentation

◆ ComplexPairTy

◆ CompoundFunc

typedef ComplexPairTy(ComplexExprEmitter::* CompoundFunc) (const ComplexExprEmitter::BinOpInfo &)

Definition at line 1528 of file CGExprComplex.cpp.

Function Documentation

◆ EmitllvmFAbs()

◆ getComplexMultiplyLibCallName()

StringRef getComplexMultiplyLibCallName ( llvm::Type * Ty)
static

Lookup the libcall name for a given floating point type complex multiply.

Definition at line 801 of file CGExprComplex.cpp.

◆ getComplexOp()

CompoundFunc getComplexOp ( BinaryOperatorKind Op)
static

Definition at line 1531 of file CGExprComplex.cpp.

◆ getComplexType()

const ComplexType * getComplexType ( QualType type)
static

Return the complex type that we are meant to emit.

Definition at line 37 of file CGExprComplex.cpp.

References clang::cast(), and clang::ast_matchers::type.