diff options
author | Mike Stump <mrs@apple.com> | 2009-03-04 15:32:52 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-03-04 15:32:52 +0000 |
commit | 96bd13ae1ab89f5a04b3ad3ec8ec1864cbba3482 (patch) | |
tree | 66f71550e9d9bb51ab3937ad2e49b6476de7a8d2 /lib/CodeGen/CodeGenFunction.h | |
parent | 6b9dfd4257b85c388a9e3cd345cf28acb7351006 (diff) |
Start the migration of more of the blocks code out of sight for most
people. De-duplicates BLOCK_NEEDS_FREE and friends.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66034 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CodeGenFunction.h')
-rw-r--r-- | lib/CodeGen/CodeGenFunction.h | 24 |
1 files changed, 2 insertions, 22 deletions
diff --git a/lib/CodeGen/CodeGenFunction.h b/lib/CodeGen/CodeGenFunction.h index f2b7ed4795..b724b72a39 100644 --- a/lib/CodeGen/CodeGenFunction.h +++ b/lib/CodeGen/CodeGenFunction.h @@ -25,6 +25,7 @@ #include <vector> #include <map> +#include "CGBlocks.h" #include "CGBuilder.h" #include "CGCall.h" #include "CGValue.h" @@ -61,7 +62,7 @@ namespace CodeGen { /// CodeGenFunction - This class organizes the per-function state that is used /// while generating LLVM code. -class CodeGenFunction { + class CodeGenFunction : public BlockFunction { CodeGenFunction(const CodeGenFunction&); // DO NOT IMPLEMENT void operator=(const CodeGenFunction&); // DO NOT IMPLEMENT public: @@ -264,27 +265,6 @@ public: // Block Bits //===--------------------------------------------------------------------===// - enum { - BLOCK_FIELD_IS_OBJECT = 3, /* id, NSObject, __attribute__((NSObject)), - block, ... */ - BLOCK_FIELD_IS_BLOCK = 7, /* a block variable */ - BLOCK_FIELD_IS_BYREF = 8, /* the on stack structure holding the __block - variable */ - BLOCK_FIELD_IS_WEAK = 16, /* declared __weak, only used in byref copy - helpers */ - BLOCK_BYREF_CALLER = 128 /* called from __block (byref) copy/dispose - support routines */ - }; - - enum { - BLOCK_NEEDS_FREE = (1 << 24), - BLOCK_HAS_COPY_DISPOSE = (1 << 25), - BLOCK_HAS_CXX_OBJ = (1 << 26), - BLOCK_IS_GC = (1 << 27), - BLOCK_IS_GLOBAL = (1 << 28), - BLOCK_HAS_DESCRIPTOR = (1 << 29) - }; - llvm::Value *BuildCopyHelper(int flag); llvm::Value *BuildDestroyHelper(int flag); |