[llvm-branch-commits] [llvm-branch] r134184 - /llvm/branches/type-system-rewrite/include/llvm/Constants.h

Chris Lattner sabre at nondot.org
Thu Jun 30 13:24:07 PDT 2011


Author: lattner
Date: Thu Jun 30 15:24:06 2011
New Revision: 134184

URL: http://llvm.org/viewvc/llvm-project?rev=134184&view=rev
Log:
land Jay's patch to add a helper function.

Modified:
    llvm/branches/type-system-rewrite/include/llvm/Constants.h

Modified: llvm/branches/type-system-rewrite/include/llvm/Constants.h
URL: http://llvm.org/viewvc/llvm-project/llvm/branches/type-system-rewrite/include/llvm/Constants.h?rev=134184&r1=134183&r2=134184&view=diff
==============================================================================
--- llvm/branches/type-system-rewrite/include/llvm/Constants.h (original)
+++ llvm/branches/type-system-rewrite/include/llvm/Constants.h Thu Jun 30 15:24:06 2011
@@ -353,6 +353,9 @@
   static Constant *get(const ArrayType *T, const std::vector<Constant*> &V);
   static Constant *get(const ArrayType *T, Constant *const *Vals, 
                        unsigned NumVals);
+  static Constant *get(const ArrayType *T, ArrayRef<Constant*> V) {
+    return get(T, V.data(), V.size());
+  }
                              
   /// This method constructs a ConstantArray and initializes it with a text
   /// string. The default behavior (AddNull==true) causes a null terminator to





More information about the llvm-branch-commits mailing list