summaryrefslogtreecommitdiff
path: root/include/llvm/Analysis/ConstantFolding.h
diff options
context:
space:
mode:
authorJay Foad <jay.foad@gmail.com>2011-07-19 13:32:40 +0000
committerJay Foad <jay.foad@gmail.com>2011-07-19 13:32:40 +0000
commit1d2f569c3428d70d0cf690c9adb459ad4a3ecff2 (patch)
treec1b9fd82505e2166d8915ad15a821ce06bbab312 /include/llvm/Analysis/ConstantFolding.h
parentc8007ab582c49bb6d165e09e6279e441af985ecf (diff)
downloadllvm-1d2f569c3428d70d0cf690c9adb459ad4a3ecff2.tar.gz
llvm-1d2f569c3428d70d0cf690c9adb459ad4a3ecff2.tar.bz2
llvm-1d2f569c3428d70d0cf690c9adb459ad4a3ecff2.tar.xz
Use ArrayRef in ConstantFoldInstOperands and ConstantFoldCall.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135477 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include/llvm/Analysis/ConstantFolding.h')
-rw-r--r--include/llvm/Analysis/ConstantFolding.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/include/llvm/Analysis/ConstantFolding.h b/include/llvm/Analysis/ConstantFolding.h
index 8d968c0ae2..b942010f10 100644
--- a/include/llvm/Analysis/ConstantFolding.h
+++ b/include/llvm/Analysis/ConstantFolding.h
@@ -27,6 +27,8 @@ namespace llvm {
class TargetData;
class Function;
class Type;
+ template<typename T>
+ class ArrayRef;
/// ConstantFoldInstruction - Try to constant fold the specified instruction.
/// If successful, the constant result is returned, if not, null is returned.
@@ -48,7 +50,7 @@ Constant *ConstantFoldConstantExpression(const ConstantExpr *CE,
/// form.
///
Constant *ConstantFoldInstOperands(unsigned Opcode, Type *DestTy,
- Constant *const *Ops, unsigned NumOps,
+ ArrayRef<Constant *> Ops,
const TargetData *TD = 0);
/// ConstantFoldCompareInstOperands - Attempt to constant fold a compare
@@ -76,7 +78,7 @@ bool canConstantFoldCallTo(const Function *F);
/// ConstantFoldCall - Attempt to constant fold a call to the specified function
/// with the specified arguments, returning null if unsuccessful.
Constant *
-ConstantFoldCall(Function *F, Constant *const *Operands, unsigned NumOperands);
+ConstantFoldCall(Function *F, ArrayRef<Constant *> Operands);
}
#endif