summaryrefslogtreecommitdiff
path: root/include/llvm/Constants.h
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-07-29 18:55:55 +0000
committerOwen Anderson <resistor@mac.com>2009-07-29 18:55:55 +0000
commitbaf3c404409d5e47b13984a7f95bfbd6d1f2e79e (patch)
treec06618ee06936e7f5a1dc3c30b313ee49d5eb09b /include/llvm/Constants.h
parent26ef510d5d20b89c637d13e2d9169c0458de775c (diff)
downloadllvm-baf3c404409d5e47b13984a7f95bfbd6d1f2e79e.tar.gz
llvm-baf3c404409d5e47b13984a7f95bfbd6d1f2e79e.tar.bz2
llvm-baf3c404409d5e47b13984a7f95bfbd6d1f2e79e.tar.xz
Move ConstantExpr to 2.5 API.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@77494 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Constants.h')
-rw-r--r--include/llvm/Constants.h36
1 files changed, 34 insertions, 2 deletions
diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h
index a3bd551790..e8ecfa3bad 100644
--- a/include/llvm/Constants.h
+++ b/include/llvm/Constants.h
@@ -584,6 +584,38 @@ public:
/// Cast constant expr
///
+
+ /// getAlignOf constant expr - computes the alignment of a type in a target
+ /// independent way (Note: the return type is an i32; Note: assumes that i8
+ /// is byte aligned).
+ static Constant* getAlignOf(const Type* Ty);
+
+ /// getSizeOf constant expr - computes the size of a type in a target
+ /// independent way (Note: the return type is an i64).
+ ///
+ static Constant* getSizeOf(const Type* Ty);
+
+ static Constant* getNeg(Constant* C);
+ static Constant* getFNeg(Constant* C);
+ static Constant* getNot(Constant* C);
+ static Constant* getAdd(Constant* C1, Constant* C2);
+ static Constant* getFAdd(Constant* C1, Constant* C2);
+ static Constant* getSub(Constant* C1, Constant* C2);
+ static Constant* getFSub(Constant* C1, Constant* C2);
+ static Constant* getMul(Constant* C1, Constant* C2);
+ static Constant* getFMul(Constant* C1, Constant* C2);
+ static Constant* getUDiv(Constant* C1, Constant* C2);
+ static Constant* getSDiv(Constant* C1, Constant* C2);
+ static Constant* getFDiv(Constant* C1, Constant* C2);
+ static Constant* getURem(Constant* C1, Constant* C2);
+ static Constant* getSRem(Constant* C1, Constant* C2);
+ static Constant* getFRem(Constant* C1, Constant* C2);
+ static Constant* getAnd(Constant* C1, Constant* C2);
+ static Constant* getOr(Constant* C1, Constant* C2);
+ static Constant* getXor(Constant* C1, Constant* C2);
+ static Constant* getShl(Constant* C1, Constant* C2);
+ static Constant* getLShr(Constant* C1, Constant* C2);
+ static Constant* getAShr(Constant* C1, Constant* C2);
static Constant *getTrunc (Constant *C, const Type *Ty);
static Constant *getSExt (Constant *C, const Type *Ty);
static Constant *getZExt (Constant *C, const Type *Ty);
@@ -661,7 +693,7 @@ public:
return getSelectTy(V1->getType(), C, V1, V2);
}
- /// ConstantExpr::get - Return a binary or shift operator constant expression,
+ /// get - Return a binary or shift operator constant expression,
/// folding if possible.
///
static Constant *get(unsigned Opcode, Constant *C1, Constant *C2);
@@ -669,7 +701,7 @@ public:
/// @brief Return an ICmp or FCmp comparison operator constant expression.
static Constant *getCompare(unsigned short pred, Constant *C1, Constant *C2);
- /// ConstantExpr::get* - Return some common constants without having to
+ /// get* - Return some common constants without having to
/// specify the full Instruction::OPCODE identifier.
///
static Constant *getICmp(unsigned short pred, Constant *LHS, Constant *RHS);