summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorChris Lattner <sabre@nondot.org>2004-10-11 22:52:25 +0000
committerChris Lattner <sabre@nondot.org>2004-10-11 22:52:25 +0000
commit7fa6e666ece60455cf9d75eff6e6915bebf05cbc (patch)
tree22e77ddd89c2978b3dd2a49878fdcc242a88e5ab /include
parent4b83380f330b1c77bb9b4ad8f63bdcf1a596afd6 (diff)
downloadllvm-7fa6e666ece60455cf9d75eff6e6915bebf05cbc.tar.gz
llvm-7fa6e666ece60455cf9d75eff6e6915bebf05cbc.tar.bz2
llvm-7fa6e666ece60455cf9d75eff6e6915bebf05cbc.tar.xz
Allow creation of GEP constantexprs with a vector of value* operands as
well as a vector of constant*'s. It turns out that this is more efficient and all of the clients want to do that, so we should cater to them. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@16923 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'include')
-rw-r--r--include/llvm/Constants.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/llvm/Constants.h b/include/llvm/Constants.h
index d0f577311e..e04b359a86 100644
--- a/include/llvm/Constants.h
+++ b/include/llvm/Constants.h
@@ -533,7 +533,7 @@ protected:
static Constant *getSelectTy(const Type *Ty,
Constant *C1, Constant *C2, Constant *C3);
static Constant *getGetElementPtrTy(const Type *Ty, Constant *C,
- const std::vector<Constant*> &IdxList);
+ const std::vector<Value*> &IdxList);
public:
// Static methods to construct a ConstantExpr of different kinds. Note that
@@ -584,10 +584,13 @@ public:
static Constant *getUShr(Constant *C1, Constant *C2); // unsigned shr
static Constant *getSShr(Constant *C1, Constant *C2); // signed shr
- /// Getelementptr form...
+ /// Getelementptr form. std::vector<Value*> is only accepted for convenience:
+ /// all elements must be Constant's.
///
static Constant *getGetElementPtr(Constant *C,
const std::vector<Constant*> &IdxList);
+ static Constant *getGetElementPtr(Constant *C,
+ const std::vector<Value*> &IdxList);
/// isNullValue - Return true if this is the value that would be returned by
/// getNullValue.