diff options
author | Jay Foad <jay.foad@gmail.com> | 2011-07-21 09:19:11 +0000 |
---|---|---|
committer | Jay Foad <jay.foad@gmail.com> | 2011-07-21 09:19:11 +0000 |
commit | 95f1ebd41b103eba1cb64305e9cc924527a8744f (patch) | |
tree | 5097dd00b8b9e7dc0499a468ea31c6c0ef3e35d2 | |
parent | 32351fa820d3e9ecd4822efa064d49072fe1d2c8 (diff) | |
download | bcm5719-llvm-95f1ebd41b103eba1cb64305e9cc924527a8744f.tar.gz bcm5719-llvm-95f1ebd41b103eba1cb64305e9cc924527a8744f.zip |
Update llvm-gcc-4.2 and dragonegg after converting ConstantFolder APIs
to use ArrayRef.
llvm-svn: 135672
-rw-r--r-- | llvm/include/llvm/Support/TargetFolder.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/llvm/include/llvm/Support/TargetFolder.h b/llvm/include/llvm/Support/TargetFolder.h index 2be8b74eb67..e6b501c88e6 100644 --- a/llvm/include/llvm/Support/TargetFolder.h +++ b/llvm/include/llvm/Support/TargetFolder.h @@ -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(), |