Update llvm-gcc-4.2 and dragonegg after converting ConstantFolder APIs
[oota-llvm.git] / 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(),