mirror of
https://github.com/c64scene-ar/llvm-6502.git
synced 2026-04-24 13:18:17 +00:00
Factor some of the constants+context related code out into a separate header, to make LLVMContextImpl.h
not hideous. Also, fix some MSVC compile errors. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@78115 91177308-0d34-0410-b5e6-96231b3b80d8
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
//===----------------------------------------------------------------------===//
|
||||
//
|
||||
// This file implements LLVMContext, as a wrapper around the opaque
|
||||
// class LLVMContextImpl.
|
||||
// struct LLVMContextImpl.
|
||||
//
|
||||
//===----------------------------------------------------------------------===//
|
||||
|
||||
@@ -29,5 +29,18 @@ LLVMContext& llvm::getGlobalContext() {
|
||||
return *GlobalContext;
|
||||
}
|
||||
|
||||
LLVMContext::LLVMContext() : pImpl(new LLVMContextImpl(*this)) { }
|
||||
LLVMContext::LLVMContext() : pImpl(new LLVMContextImpl()) { }
|
||||
LLVMContext::~LLVMContext() { delete pImpl; }
|
||||
|
||||
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];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user