summaryrefslogtreecommitdiff
path: root/include/llvm/Support/NoFolder.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/Support/NoFolder.h
parent2df72c144164cbb06e505f3af506e1bb69053e73 (diff)
downloadllvm-bdc46c6af5ffcf3596a72df75880fe8703436060.tar.gz
llvm-bdc46c6af5ffcf3596a72df75880fe8703436060.tar.bz2
llvm-bdc46c6af5ffcf3596a72df75880fe8703436060.tar.xz
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/Support/NoFolder.h')
-rw-r--r--include/llvm/Support/NoFolder.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/Support/NoFolder.h b/include/llvm/Support/NoFolder.h
index 7f2f1497f3..f6f4c5b3c8 100644
--- a/include/llvm/Support/NoFolder.h
+++ b/include/llvm/Support/NoFolder.h
@@ -115,6 +115,9 @@ public:
Value *CreateNeg(Constant *C) const {
return BinaryOperator::CreateNeg(C);
}
+ Value *CreateNSWNeg(Constant *C) const {
+ return BinaryOperator::CreateNSWNeg(C);
+ }
Value *CreateNot(Constant *C) const {
return BinaryOperator::CreateNot(C);
}