aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-03-29 02:37:53 +0000
committerChris Lattner <sabre@nondot.org>2004-03-29 02:37:53 +0000
commit4dcb5401e4f6248eb546e4da444ba8e8cf306666 (patch)
tree9c04b07b0b04cb4edcb71387bd7b4371400d42fb /include
parent944cfafe76c9567cab806e8a6f7ad67686dfe717 (diff)
downloadexternal_llvm-4dcb5401e4f6248eb546e4da444ba8e8cf306666.zip
external_llvm-4dcb5401e4f6248eb546e4da444ba8e8cf306666.tar.gz
external_llvm-4dcb5401e4f6248eb546e4da444ba8e8cf306666.tar.bz2
Add a bunch of methods that should have been added a long time ago.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@12526 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Constants.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h
index 1d4892f..2e471cb 100644
--- a/include/llvm/Constants.h
+++ b/include/llvm/Constants.h
@@ -559,6 +559,28 @@ public:
return getTy(C1->getType(), Opcode, C1, C2);
}
+ /// ConstantExpr::get* - Return some common constants without having to
+ /// specify the full Instruction::OPCODE identifier.
+ ///
+ static Constant *getNeg(Constant *C);
+ static Constant *getNot(Constant *C);
+ static Constant *getAdd(Constant *C1, Constant *C2);
+ static Constant *getSub(Constant *C1, Constant *C2);
+ static Constant *getMul(Constant *C1, Constant *C2);
+ static Constant *getDiv(Constant *C1, Constant *C2);
+ static Constant *getRem(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 *getSetEQ(Constant *C1, Constant *C2);
+ static Constant *getSetNE(Constant *C1, Constant *C2);
+ static Constant *getSetLT(Constant *C1, Constant *C2);
+ static Constant *getSetGT(Constant *C1, Constant *C2);
+ static Constant *getSetLE(Constant *C1, Constant *C2);
+ static Constant *getSetGE(Constant *C1, Constant *C2);
+ static Constant *getShl(Constant *C1, Constant *C2);
+ static Constant *getShr(Constant *C1, Constant *C2);
+
/// Getelementptr form...
///
static Constant *getGetElementPtr(Constant *C,