Update llvm-gcc-4.2 and dragonegg after converting ConstantFolder APIs
authorJay Foad <jay.foad@gmail.com>
Thu, 21 Jul 2011 09:19:11 +0000 (09:19 +0000)
committerJay Foad <jay.foad@gmail.com>
Thu, 21 Jul 2011 09:19:11 +0000 (09:19 +0000)
to use ArrayRef.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@135672 91177308-0d34-0410-b5e6-96231b3b80d8

include/llvm/Support/TargetFolder.h

index 2be8b74eb67bc21c9c66f57ec28cd0d83dde0f64..e6b501c88e6c4cd82f03c7f5c91c74a58cebb984 100644 (file)
@@ -152,6 +152,12 @@ public:
     return Fold(ConstantExpr::getInBoundsGetElementPtr(C, IdxList.data(),
                                                        IdxList.size()));
   }
+  Constant *CreateInBoundsGetElementPtr(Constant *C, Constant *Idx) const {
+    // This form of the function only exists to avoid ambiguous overload
+    // warnings about whether to convert Idx to ArrayRef<Constant *> or
+    // ArrayRef<Value *>.
+    return Fold(ConstantExpr::getInBoundsGetElementPtr(C, &Idx, 1));
+  }
   Constant *CreateInBoundsGetElementPtr(Constant *C,
                                         ArrayRef<Value *> IdxList) const {
     return Fold(ConstantExpr::getInBoundsGetElementPtr(C, IdxList.data(),