aboutsummaryrefslogtreecommitdiff
path: root/include/llvm/Constants.h
diff options
context:
space:
mode:
authorDan Gohman <gohman@apple.com>2009-12-18 02:58:50 +0000
committerDan Gohman <gohman@apple.com>2009-12-18 02:58:50 +0000
commitbdc46c6af5ffcf3596a72df75880fe8703436060 (patch)
treed85a0303352cc1f8bbf93e8e4e1ee1affb7506b7 /include/llvm/Constants.h
parent2df72c144164cbb06e505f3af506e1bb69053e73 (diff)
Add utility routines for creating integer negation operators with NSW set.
Integer negation only overflows with INT_MIN, but that's an important case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@91662 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Constants.h')
-rw-r--r--include/llvm/Constants.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h
index caa13f6ac6..7440f99c50 100644
--- a/include/llvm/Constants.h
+++ b/include/llvm/Constants.h
@@ -692,6 +692,7 @@ public:
static Constant *getIntToPtr(Constant *C, const Type *Ty);
static Constant *getBitCast (Constant *C, const Type *Ty);
+ static Constant *getNSWNeg(Constant *C);
static Constant *getNSWAdd(Constant *C1, Constant *C2);
static Constant *getNSWSub(Constant *C1, Constant *C2);
static Constant *getExactSDiv(Constant *C1, Constant *C2);