diff options
author | Owen Anderson <resistor@mac.com> | 2009-08-04 20:25:11 +0000 |
---|---|---|
committer | Owen Anderson <resistor@mac.com> | 2009-08-04 20:25:11 +0000 |
commit | 1584a295363ff298d082e184eefea8b783d6fc48 (patch) | |
tree | b025512809e0c9dc76fee04da2c30bde3292b4ff /llvm/lib/VMCore/LLVMContextImpl.cpp | |
parent | 16dc0cd8a23ae0e44a6963a77e5c2ead873ff83c (diff) | |
download | bcm5719-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.cpp | 13 |
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 |