forked from OSchip/llvm-project
Move some of the CodeGenFunction blocks code up and out. No
functionality change. llvm-svn: 66048
This commit is contained in:
parent
6c39666a77
commit
06acea8a69
|
@ -664,7 +664,7 @@ uint64_t CodeGenFunction::getBlockOffset(const BlockDeclRefExpr *BDRE) {
|
|||
return BlockOffset-Size;
|
||||
}
|
||||
|
||||
llvm::Value *CodeGenFunction::BuildCopyHelper(int flag) {
|
||||
llvm::Value *BlockFunction::BuildCopyHelper(int flag) {
|
||||
const llvm::PointerType *PtrToInt8Ty
|
||||
= llvm::PointerType::getUnqual(llvm::Type::Int8Ty);
|
||||
// FIXME: implement
|
||||
|
@ -674,7 +674,7 @@ llvm::Value *CodeGenFunction::BuildCopyHelper(int flag) {
|
|||
return V;
|
||||
}
|
||||
|
||||
llvm::Value *CodeGenFunction::BuildDestroyHelper(int flag) {
|
||||
llvm::Value *BlockFunction::BuildDestroyHelper(int flag) {
|
||||
const llvm::PointerType *PtrToInt8Ty
|
||||
= llvm::PointerType::getUnqual(llvm::Type::Int8Ty);
|
||||
// FIXME: implement
|
||||
|
|
|
@ -117,6 +117,14 @@ public:
|
|||
BLOCK_BYREF_CALLER = 128 /* called from __block (byref) copy/dispose
|
||||
support routines */
|
||||
};
|
||||
|
||||
CGBuilderTy &Builder;
|
||||
|
||||
BlockFunction(CGBuilderTy &B) : Builder(B) { }
|
||||
|
||||
llvm::Value *BuildCopyHelper(int flag);
|
||||
llvm::Value *BuildDestroyHelper(int flag);
|
||||
|
||||
};
|
||||
|
||||
} // end namespace CodeGen
|
||||
|
|
|
@ -24,8 +24,8 @@ using namespace clang;
|
|||
using namespace CodeGen;
|
||||
|
||||
CodeGenFunction::CodeGenFunction(CodeGenModule &cgm)
|
||||
: CGM(cgm), Target(CGM.getContext().Target), DebugInfo(0), SwitchInsn(0),
|
||||
CaseRangeBlock(0), InvokeDest(0) {
|
||||
: BlockFunction(Builder), CGM(cgm), Target(CGM.getContext().Target),
|
||||
DebugInfo(0), SwitchInsn(0), CaseRangeBlock(0), InvokeDest(0) {
|
||||
LLVMIntTy = ConvertType(getContext().IntTy);
|
||||
LLVMPointerWidth = Target.getPointerWidth(0);
|
||||
|
||||
|
|
|
@ -265,9 +265,6 @@ public:
|
|||
// Block Bits
|
||||
//===--------------------------------------------------------------------===//
|
||||
|
||||
llvm::Value *BuildCopyHelper(int flag);
|
||||
llvm::Value *BuildDestroyHelper(int flag);
|
||||
|
||||
llvm::Value *BuildBlockLiteralTmp(const BlockExpr *);
|
||||
llvm::Constant *BuildDescriptorBlockDecl(uint64_t Size);
|
||||
|
||||
|
|
Loading…
Reference in New Issue