Use ArrayRef in ConstantFoldInstOperands and ConstantFoldCall.
[oota-llvm.git] / include / llvm / Analysis / ConstantFolding.h
index 8d968c0ae2053a2cf6c58a09d75227bdcb0c0b1e..b942010f10ca88cbe6540e248b374ad979e38959 100644 (file)
@@ -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