diff options
author | Dan Gohman <gohman@apple.com> | 2009-08-11 20:20:39 +0000 |
---|---|---|
committer | Dan Gohman <gohman@apple.com> | 2009-08-11 20:20:39 +0000 |
commit | d6474fa1f19224e62e5095a6373bed0c69bdb215 (patch) | |
tree | aa69c7dfdd8a78e041b75c782b5f9985560e87c4 /include/llvm/Support/ConstantFolder.h | |
parent | 8409bfbbc306bc051fbd8b049804103ca7df2f63 (diff) |
Add convenience functions for creating nsw add operators.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78707 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Support/ConstantFolder.h')
-rw-r--r-- | include/llvm/Support/ConstantFolder.h | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/include/llvm/Support/ConstantFolder.h b/include/llvm/Support/ConstantFolder.h index 1b5b2b7745..ef70a898e4 100644 --- a/include/llvm/Support/ConstantFolder.h +++ b/include/llvm/Support/ConstantFolder.h @@ -35,6 +35,9 @@ public: Constant *CreateAdd(Constant *LHS, Constant *RHS) const { return ConstantExpr::getAdd(LHS, RHS); } + Constant *CreateNSWAdd(Constant *LHS, Constant *RHS) const { + return ConstantExpr::getNSWAdd(LHS, RHS); + } Constant *CreateFAdd(Constant *LHS, Constant *RHS) const { return ConstantExpr::getFAdd(LHS, RHS); } |