[cfe-commits] r66048 - in /cfe/trunk/lib/CodeGen: CGBlocks.cpp CGBlocks.h CodeGenFunction.cpp CodeGenFunction.h
Mike Stump
mrs at apple.com
Wed Mar 4 10:57:26 PST 2009
Author: mrs
Date: Wed Mar 4 12:57:26 2009
New Revision: 66048
URL: http://llvm.org/viewvc/llvm-project?rev=66048&view=rev
Log:
Move some of the CodeGenFunction blocks code up and out. No
functionality change.
Modified:
cfe/trunk/lib/CodeGen/CGBlocks.cpp
cfe/trunk/lib/CodeGen/CGBlocks.h
cfe/trunk/lib/CodeGen/CodeGenFunction.cpp
cfe/trunk/lib/CodeGen/CodeGenFunction.h
Modified: cfe/trunk/lib/CodeGen/CGBlocks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBlocks.cpp?rev=66048&r1=66047&r2=66048&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBlocks.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBlocks.cpp Wed Mar 4 12:57:26 2009
@@ -664,7 +664,7 @@
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 @@
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
Modified: cfe/trunk/lib/CodeGen/CGBlocks.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBlocks.h?rev=66048&r1=66047&r2=66048&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBlocks.h (original)
+++ cfe/trunk/lib/CodeGen/CGBlocks.h Wed Mar 4 12:57:26 2009
@@ -117,6 +117,14 @@
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
Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.cpp?rev=66048&r1=66047&r2=66048&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenFunction.cpp (original)
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.cpp Wed Mar 4 12:57:26 2009
@@ -24,8 +24,8 @@
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);
Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.h?rev=66048&r1=66047&r2=66048&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenFunction.h (original)
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.h Wed Mar 4 12:57:26 2009
@@ -265,9 +265,6 @@
// Block Bits
//===--------------------------------------------------------------------===//
- llvm::Value *BuildCopyHelper(int flag);
- llvm::Value *BuildDestroyHelper(int flag);
-
llvm::Value *BuildBlockLiteralTmp(const BlockExpr *);
llvm::Constant *BuildDescriptorBlockDecl(uint64_t Size);
More information about the cfe-commits
mailing list