summaryrefslogtreecommitdiffstats
path: root/llvm/include/llvm/Analysis/ConstantFolding.h
diff options
context:
space:
mode:
Diffstat (limited to 'llvm/include/llvm/Analysis/ConstantFolding.h')
-rw-r--r--llvm/include/llvm/Analysis/ConstantFolding.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/include/llvm/Analysis/ConstantFolding.h b/llvm/include/llvm/Analysis/ConstantFolding.h
index a22913a0b90..bf360f7e884 100644
--- a/llvm/include/llvm/Analysis/ConstantFolding.h
+++ b/llvm/include/llvm/Analysis/ConstantFolding.h
@@ -30,6 +30,12 @@ namespace llvm {
///
Constant *ConstantFoldInstruction(Instruction *I, const TargetData *TD = 0);
+/// ConstantFoldConstantExpression - Attempt to fold the constant expression
+/// using the specified TargetData. If successful, the constant result is
+/// result is returned, if not, null is returned.
+Constant *ConstantFoldConstantExpression(ConstantExpr *CE,
+ const TargetData *TD);
+
/// ConstantFoldInstOperands - Attempt to constant fold an instruction with the
/// specified operands. If successful, the constant result is returned, if not,
/// null is returned. Note that this function can fail when attempting to
OpenPOWER on IntegriCloud