summaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorReid Spencer <rspencer@reidspencer.com>2006-12-04 21:34:17 +0000
committerReid Spencer <rspencer@reidspencer.com>2006-12-04 21:34:17 +0000
commit90fdf9c6debbdcc61076a1e020c3dff4dc71d838 (patch)
tree32dd2093d97a5e92dd7a6eddebe382d4503290bc /include
parent09906f3e1a1dc40be1f4a1381d0aaafed6657a8e (diff)
downloadexternal_llvm-90fdf9c6debbdcc61076a1e020c3dff4dc71d838.zip
external_llvm-90fdf9c6debbdcc61076a1e020c3dff4dc71d838.tar.gz
external_llvm-90fdf9c6debbdcc61076a1e020c3dff4dc71d838.tar.bz2
Separate the get and getTy functions for ICmp and FCmp into getCompare
and getCompareTy. Also, fix some incorrect comments. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@32199 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Constants.h19
1 files changed, 12 insertions, 7 deletions
diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h
index 47255de..93be8bf 100644
--- a/include/llvm/Constants.h
+++ b/include/llvm/Constants.h
@@ -498,7 +498,9 @@ protected:
// These private methods are used by the type resolution code to create
// ConstantExprs in intermediate forms.
static Constant *getTy(const Type *Ty, unsigned Opcode,
- Constant *C1, Constant *C2, unsigned short pred = 0);
+ Constant *C1, Constant *C2);
+ static Constant *getCompareTy(unsigned Opcode, unsigned short pred,
+ Constant *C1, Constant *C2);
static Constant *getShiftTy(const Type *Ty,
unsigned Opcode, Constant *C1, Constant *C2);
static Constant *getSelectTy(const Type *Ty,
@@ -549,14 +551,14 @@ public:
// @brief Create a SExt or BitCast cast constant expression
static Constant *getSExtOrBitCast(
- Constant *C, ///< The constant to zext or bitcast
- const Type *Ty ///< The type to zext or bitcast C to
+ Constant *C, ///< The constant to sext or bitcast
+ const Type *Ty ///< The type to sext or bitcast C to
);
// @brief Create a Trunc or BitCast cast constant expression
static Constant *getTruncOrBitCast(
- Constant *C, ///< The constant to zext or bitcast
- const Type *Ty ///< The type to zext or bitcast C to
+ Constant *C, ///< The constant to trunc or bitcast
+ const Type *Ty ///< The type to trunc or bitcast C to
);
// This method uses the CastInst::getCastOpcode method to infer the
@@ -593,8 +595,11 @@ public:
/// ConstantExpr::get - Return a binary or shift operator constant expression,
/// folding if possible.
///
- static Constant *get(unsigned Opcode, Constant *C1, Constant *C2,
- unsigned short pred = 0);
+ static Constant *get(unsigned Opcode, Constant *C1, Constant *C2);
+
+ /// @brief Return an ICmp or FCmp comparison operator constante expression.
+ static Constant *getCompare(unsigned Opcode, unsigned short pred,
+ Constant *C1, Constant *C2);
/// ConstantExpr::get* - Return some common constants without having to
/// specify the full Instruction::OPCODE identifier.