summaryrefslogtreecommitdiffstats
path: root/llvm/lib/VMCore/LLVMContextImpl.cpp
diff options
context:
space:
mode:
authorOwen Anderson <resistor@mac.com>2009-08-04 20:25:11 +0000
committerOwen Anderson <resistor@mac.com>2009-08-04 20:25:11 +0000
commit1584a295363ff298d082e184eefea8b783d6fc48 (patch)
treeb025512809e0c9dc76fee04da2c30bde3292b4ff /llvm/lib/VMCore/LLVMContextImpl.cpp
parent16dc0cd8a23ae0e44a6963a77e5c2ead873ff83c (diff)
downloadbcm5719-llvm-1584a295363ff298d082e184eefea8b783d6fc48.tar.gz
bcm5719-llvm-1584a295363ff298d082e184eefea8b783d6fc48.zip
Privatize the last bit of Constant-creation state.
llvm-svn: 78097
Diffstat (limited to 'llvm/lib/VMCore/LLVMContextImpl.cpp')
-rw-r--r--llvm/lib/VMCore/LLVMContextImpl.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/llvm/lib/VMCore/LLVMContextImpl.cpp b/llvm/lib/VMCore/LLVMContextImpl.cpp
index 5216476fea6..83c9b7daf4d 100644
--- a/llvm/lib/VMCore/LLVMContextImpl.cpp
+++ b/llvm/lib/VMCore/LLVMContextImpl.cpp
@@ -21,3 +21,16 @@ using namespace llvm;
LLVMContextImpl::LLVMContextImpl(LLVMContext &C) :
Context(C), TheTrueVal(0), TheFalseVal(0) { }
+
+GetElementPtrConstantExpr::GetElementPtrConstantExpr
+ (Constant *C,
+ const std::vector<Constant*> &IdxList,
+ const Type *DestTy)
+ : ConstantExpr(DestTy, Instruction::GetElementPtr,
+ OperandTraits<GetElementPtrConstantExpr>::op_end(this)
+ - (IdxList.size()+1),
+ IdxList.size()+1) {
+ OperandList[0] = C;
+ for (unsigned i = 0, E = IdxList.size(); i != E; ++i)
+ OperandList[i+1] = IdxList[i];
+} \ No newline at end of file
OpenPOWER on IntegriCloud