Make the mem2reg interface use an ArrayRef as it keeps a copy of these
[oota-llvm.git] / include / llvm / Transforms / Utils / PromoteMemToReg.h
index fde4b81d7f1f2e496e483244d5b9333794f5461e..22f46e5fc963c55b822a77ec5040272f9820fb26 100644 (file)
@@ -15,7 +15,7 @@
 #ifndef LLVM_TRANSFORMS_UTILS_PROMOTEMEMTOREG_H
 #define LLVM_TRANSFORMS_UTILS_PROMOTEMEMTOREG_H
 
-#include <vector>
+#include "llvm/ADT/ArrayRef.h"
 
 namespace llvm {
 
@@ -40,8 +40,8 @@ bool isAllocaPromotable(const AllocaInst *AI);
 ///
 /// If AST is specified, the specified tracker is updated to reflect changes
 /// made to the IR.
-void PromoteMemToReg(const std::vector<AllocaInst*> &Allocas,
-                     DominatorTree &DT, AliasSetTracker *AST = 0);
+void PromoteMemToReg(ArrayRef<AllocaInst *> Allocas, DominatorTree &DT,
+                     AliasSetTracker *AST = 0);
 
 } // End llvm namespace