Lines Matching defs:MCExpr

1 //===- MCExpr.h - Assembly Level Expressions --------------------*- C++ -*-===//
31 /// MCExpr - Base class for the full range of assembler expressions which are
33 class MCExpr {
46 MCExpr(const MCExpr&) LLVM_DELETED_FUNCTION;
47 void operator=(const MCExpr&) LLVM_DELETED_FUNCTION;
53 explicit MCExpr(ExprKind _Kind) : Kind(_Kind) {}
115 inline raw_ostream &operator<<(raw_ostream &OS, const MCExpr &E) {
121 class MCConstantExpr : public MCExpr {
125 : MCExpr(MCExpr::Constant), Value(_Value) {}
141 static bool classof(const MCExpr *E) {
142 return E->getKind() == MCExpr::Constant;
152 class MCSymbolRefExpr : public MCExpr {
284 : MCExpr(MCExpr::SymbolRef), Symbol(_Symbol), Kind(_Kind), MAI(_MAI) {
321 static bool classof(const MCExpr *E) {
322 return E->getKind() == MCExpr::SymbolRef;
327 class MCUnaryExpr : public MCExpr {
338 const MCExpr *Expr;
340 MCUnaryExpr(Opcode _Op, const MCExpr *_Expr)
341 : MCExpr(MCExpr::Unary), Op(_Op), Expr(_Expr) {}
347 static const MCUnaryExpr *Create(Opcode Op, const MCExpr *Expr,
349 static const MCUnaryExpr *CreateLNot(const MCExpr *Expr, MCContext &Ctx) {
352 static const MCUnaryExpr *CreateMinus(const MCExpr *Expr, MCContext &Ctx) {
355 static const MCUnaryExpr *CreateNot(const MCExpr *Expr, MCContext &Ctx) {
358 static const MCUnaryExpr *CreatePlus(const MCExpr *Expr, MCContext &Ctx) {
370 const MCExpr *getSubExpr() const { return Expr; }
374 static bool classof(const MCExpr *E) {
375 return E->getKind() == MCExpr::Unary;
380 class MCBinaryExpr : public MCExpr {
409 const MCExpr *LHS, *RHS;
411 MCBinaryExpr(Opcode _Op, const MCExpr *_LHS, const MCExpr *_RHS)
412 : MCExpr(MCExpr::Binary), Op(_Op), LHS(_LHS), RHS(_RHS) {}
418 static const MCBinaryExpr *Create(Opcode Op, const MCExpr *LHS,
419 const MCExpr *RHS, MCContext &Ctx);
420 static const MCBinaryExpr *CreateAdd(const MCExpr *LHS, const MCExpr *RHS,
424 static const MCBinaryExpr *CreateAnd(const MCExpr *LHS, const MCExpr *RHS,
428 static const MCBinaryExpr *CreateDiv(const MCExpr *LHS, const MCExpr *RHS,
432 static const MCBinaryExpr *CreateEQ(const MCExpr *LHS, const MCExpr *RHS,
436 static const MCBinaryExpr *CreateGT(const MCExpr *LHS, const MCExpr *RHS,
440 static const MCBinaryExpr *CreateGTE(const MCExpr *LHS, const MCExpr *RHS,
444 static const MCBinaryExpr *CreateLAnd(const MCExpr *LHS, const MCExpr *RHS,
448 static const MCBinaryExpr *CreateLOr(const MCExpr *LHS, const MCExpr *RHS,
452 static const MCBinaryExpr *CreateLT(const MCExpr *LHS, const MCExpr *RHS,
456 static const MCBinaryExpr *CreateLTE(const MCExpr *LHS, const MCExpr *RHS,
460 static const MCBinaryExpr *CreateMod(const MCExpr *LHS, const MCExpr *RHS,
464 static const MCBinaryExpr *CreateMul(const MCExpr *LHS, const MCExpr *RHS,
468 static const MCBinaryExpr *CreateNE(const MCExpr *LHS, const MCExpr *RHS,
472 static const MCBinaryExpr *CreateOr(const MCExpr *LHS, const MCExpr *RHS,
476 static const MCBinaryExpr *CreateShl(const MCExpr *LHS, const MCExpr *RHS,
480 static const MCBinaryExpr *CreateShr(const MCExpr *LHS, const MCExpr *RHS,
484 static const MCBinaryExpr *CreateSub(const MCExpr *LHS, const MCExpr *RHS,
488 static const MCBinaryExpr *CreateXor(const MCExpr *LHS, const MCExpr *RHS,
501 const MCExpr *getLHS() const { return LHS; }
504 const MCExpr *getRHS() const { return RHS; }
508 static bool classof(const MCExpr *E) {
509 return E->getKind() == MCExpr::Binary;
513 /// MCTargetExpr - This is an extension point for target-specific MCExpr
518 class MCTargetExpr : public MCExpr {
521 MCTargetExpr() : MCExpr(Target) {}
533 static bool classof(const MCExpr *E) {
534 return E->getKind() == MCExpr::Target;