From 59c4f5c2fc82af14b0f4f332709aac62921c6177 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 11 Aug 2009 17:05:24 +0000 Subject: Add convenience functions for creating exact sdiv operators, and use them in CreatePtrDiff. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78682 91177308-0d34-0410-b5e6-96231b3b80d8 --- include/llvm/Support/ConstantFolder.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'include/llvm/Support/ConstantFolder.h') diff --git a/include/llvm/Support/ConstantFolder.h b/include/llvm/Support/ConstantFolder.h index cb9b055..422d1ad 100644 --- a/include/llvm/Support/ConstantFolder.h +++ b/include/llvm/Support/ConstantFolder.h @@ -56,6 +56,9 @@ public: Constant *CreateSDiv(Constant *LHS, Constant *RHS) const { return ConstantExpr::getSDiv(LHS, RHS); } + Constant *CreateExactSDiv(Constant *LHS, Constant *RHS) const { + return ConstantExpr::getExactSDiv(LHS, RHS); + } Constant *CreateFDiv(Constant *LHS, Constant *RHS) const { return ConstantExpr::getFDiv(LHS, RHS); } -- cgit v1.1