aboutsummaryrefslogtreecommitdiffstats
path: root/include/llvm/Constants.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/llvm/Constants.h')
-rw-r--r--include/llvm/Constants.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h
index 5a17f39..c92229e 100644
--- a/include/llvm/Constants.h
+++ b/include/llvm/Constants.h
@@ -36,7 +36,7 @@ template<class ConstantClass, class TypeClass>
struct ConvertConstantType;
//===----------------------------------------------------------------------===//
-/// This is the shared class of boolean and integrer constants. This class
+/// This is the shared class of boolean and integer constants. This class
/// represents both boolean and integral constants.
/// @brief Class for constant integers.
class ConstantInt : public Constant {
@@ -585,6 +585,11 @@ public:
static Constant *getInsertElement(Constant *Vec, Constant *Elt,Constant *Idx);
static Constant *getShuffleVector(Constant *V1, Constant *V2, Constant *Mask);
+ /// Floating point negation must be implemented with f(x) = -0.0 - x. This
+ /// method returns the negative zero constant for floating point or packed
+ /// floating point types; for all other types, it returns the null value.
+ static Constant *getZeroValueForNegationExpr(const Type *Ty);
+
/// isNullValue - Return true if this is the value that would be returned by
/// getNullValue.
virtual bool isNullValue() const { return false; }