clang 20.0.0git
Namespaces | Macros | Typedefs | Functions
CGExprComplex.cpp File Reference
#include "CGOpenMPRuntime.h"
#include "CodeGenFunction.h"
#include "CodeGenModule.h"
#include "ConstantEmitter.h"
#include "clang/AST/StmtVisitor.h"
#include "llvm/ADT/STLExtras.h"
#include "llvm/IR/Constants.h"
#include "llvm/IR/Instructions.h"
#include "llvm/IR/MDBuilder.h"
#include "llvm/IR/Metadata.h"
#include <algorithm>

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) ? true : false); \
ComplexPairTy result = EmitBin##OP(EmitBinOps(E, promotionTy)); \
if (!promotionTy.isNull()) \
result = CGF.EmitUnPromotedValue(result, E->getType()); \
return result; \
}
CodeGenFunction::ComplexPairTy ComplexPairTy
Expr * E
A builtin binary operation expression such as "x + y" or "x <= y".
Definition: Expr.h:3860
QualType getType() const
Definition: Expr.h:142
A (possibly-)qualified type.
Definition: Type.h:941
bool isNull() const
Return true if this QualType doesn't point to a type yet.
Definition: Type.h:1008

Definition at line 355 of file CGExprComplex.cpp.

Typedef Documentation

◆ ComplexPairTy

typedef CodeGenFunction::ComplexPairTy ComplexPairTy

Definition at line 35 of file CGExprComplex.cpp.

◆ CompoundFunc

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

Definition at line 1520 of file CGExprComplex.cpp.

Function Documentation

◆ EmitllvmFAbs()

static llvm::Value * EmitllvmFAbs ( CodeGenFunction CGF,
llvm::Value Value 
)
static

◆ getComplexMultiplyLibCallName()

static StringRef getComplexMultiplyLibCallName ( llvm::Type Ty)
static

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

Definition at line 800 of file CGExprComplex.cpp.

◆ getComplexOp()

static CompoundFunc getComplexOp ( BinaryOperatorKind  Op)
static

Definition at line 1523 of file CGExprComplex.cpp.

◆ getComplexType()

static const ComplexType * getComplexType ( QualType  type)
static

Return the complex type that we are meant to emit.

Definition at line 38 of file CGExprComplex.cpp.

References clang::ast_matchers::type.