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 | 556a7eb93873477106bfacb1b61a03a272407fcb (patch) | |
tree | 0fcc71e3d8dd3c289f4529427dcfc91331f03dfa /lib/VMCore/LLVMContextImpl.cpp | |
parent | 9dcecb924df97dee0a45b639a8bd1a364eba23e5 (diff) | |
download | external_llvm-556a7eb93873477106bfacb1b61a03a272407fcb.zip external_llvm-556a7eb93873477106bfacb1b61a03a272407fcb.tar.gz external_llvm-556a7eb93873477106bfacb1b61a03a272407fcb.tar.bz2 |
Privatize the last bit of Constant-creation state.
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78097 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/VMCore/LLVMContextImpl.cpp')
-rw-r--r-- | lib/VMCore/LLVMContextImpl.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/VMCore/LLVMContextImpl.cpp b/lib/VMCore/LLVMContextImpl.cpp index 5216476..83c9b7d 100644 --- a/lib/VMCore/LLVMContextImpl.cpp +++ b/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 |