diff options
author | Mike Stump <mrs@apple.com> | 2009-03-25 18:05:39 +0000 |
---|---|---|
committer | Mike Stump <mrs@apple.com> | 2009-03-25 18:05:39 +0000 |
commit | 871c1f6f888b0ecd07aa1cc229d69f2b8be64ddc (patch) | |
tree | be76f195561cb70046a6670ee6bd96170d957bd5 /clang/lib/CodeGen/CGBlocks.cpp | |
parent | d2142cffbf0b34d9f7cd4e36539205c8f02ff7d2 (diff) | |
download | bcm5719-llvm-871c1f6f888b0ecd07aa1cc229d69f2b8be64ddc.tar.gz bcm5719-llvm-871c1f6f888b0ecd07aa1cc229d69f2b8be64ddc.zip |
Remove -f__block as codegen for __block variables should be solid.
llvm-svn: 67697
Diffstat (limited to 'clang/lib/CodeGen/CGBlocks.cpp')
-rw-r--r-- | clang/lib/CodeGen/CGBlocks.cpp | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/clang/lib/CodeGen/CGBlocks.cpp b/clang/lib/CodeGen/CGBlocks.cpp index eba741bc3c4..db1539bd632 100644 --- a/clang/lib/CodeGen/CGBlocks.cpp +++ b/clang/lib/CodeGen/CGBlocks.cpp @@ -25,14 +25,6 @@ using namespace CodeGen; // Temporary code to enable testing of __block variables // #include "clang/Frontend/CompileOptions.h" #include "llvm/Support/CommandLine.h" -static llvm::cl::opt<bool> -Enable__block("f__block", - // See all the FIXMEs for the various work that needs to be done - llvm::cl::desc("temporary option to turn on __block precessing " - "even though the code isn't done yet"), - llvm::cl::ValueDisallowed, llvm::cl::AllowInverse, - llvm::cl::ZeroOrMore, - llvm::cl::init(true)); llvm::Constant *CodeGenFunction:: BuildDescriptorBlockDecl(bool BlockHasCopyDispose, uint64_t Size, @@ -166,9 +158,6 @@ llvm::Value *CodeGenFunction::BuildBlockLiteralTmp(const BlockExpr *BE) { BlockHasCopyDispose |= subBlockHasCopyDispose; Elts[3] = Fn; - if (!Enable__block && BlockHasCopyDispose) - ErrorUnsupported(BE, "block literal that requires copy/dispose"); - if (subBlockHasCopyDispose) flags |= BLOCK_HAS_COPY_DISPOSE; @@ -488,17 +477,6 @@ llvm::Value *CodeGenFunction::GetAddrOfBlockDecl(const BlockDeclRefExpr *E) { const llvm::Type *Ty; Ty = CGM.getTypes().ConvertType(E->getDecl()->getType()); - if (!Enable__block && E->isByRef()) - ErrorUnsupported(E, "__block variable in block literal"); - else if (!Enable__block && E->getType()->isBlockPointerType()) - ErrorUnsupported(E, "block pointer in block literal"); - else if (!Enable__block && (E->getDecl()->getAttr<ObjCNSObjectAttr>() || - getContext().isObjCNSObjectType(E->getType()))) - ErrorUnsupported(E, "__attribute__((NSObject)) variable in block " - "literal"); - else if (!Enable__block && getContext().isObjCObjectPointerType(E->getType())) - ErrorUnsupported(E, "Objective-C variable in block literal"); - // See if we have already allocated an offset for this variable. if (offset == 0) { // Don't run the expensive check, unless we have to. |