[cfe-commits] r134536 - in /cfe/trunk: lib/CodeGen/CGBlocks.cpp test/CodeGen/reset-local-block.c
Fariborz Jahanian
fjahanian at apple.com
Wed Jul 6 14:05:11 PDT 2011
Author: fjahanian
Date: Wed Jul 6 16:05:11 2011
New Revision: 134536
URL: http://llvm.org/viewvc/llvm-project?rev=134536&view=rev
Log:
revert patch for // rdar://9227352
Removed:
cfe/trunk/test/CodeGen/reset-local-block.c
Modified:
cfe/trunk/lib/CodeGen/CGBlocks.cpp
Modified: cfe/trunk/lib/CodeGen/CGBlocks.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGBlocks.cpp?rev=134536&r1=134535&r2=134536&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGBlocks.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGBlocks.cpp Wed Jul 6 16:05:11 2011
@@ -25,22 +25,6 @@
using namespace clang;
using namespace CodeGen;
-struct CallMemsetLocalBlockObject : EHScopeStack::Cleanup {
- llvm::AllocaInst *BlockAddr;
- CharUnits BlockSize;
-
- CallMemsetLocalBlockObject(llvm::AllocaInst *blockAddr,
- CharUnits blocSize)
- : BlockAddr(blockAddr), BlockSize(blocSize) {}
-
- void Emit(CodeGenFunction &CGF, bool isForEH) {
- CGF.Builder.CreateMemSet(BlockAddr,
- llvm::ConstantInt::get(CGF.Int8Ty, 0xCD),
- BlockSize.getQuantity(),
- BlockAddr->getAlignment());
- }
-};
-
CGBlockInfo::CGBlockInfo(const BlockExpr *blockExpr, const char *N)
: Name(N), CXXThisIndex(0), CanBeGlobal(false), NeedsCopyDispose(false),
HasCXXObject(false), UsesStret(false), StructureType(0), Block(blockExpr) {
@@ -665,9 +649,6 @@
llvm::Value *result =
Builder.CreateBitCast(blockAddr,
ConvertType(blockInfo.getBlockExpr()->getType()));
- if (getLangOptions().CatchUndefined)
- EHStack.pushCleanup<CallMemsetLocalBlockObject>(NormalCleanup, blockAddr,
- blockInfo.BlockSize);
return result;
}
Removed: cfe/trunk/test/CodeGen/reset-local-block.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/reset-local-block.c?rev=134535&view=auto
==============================================================================
--- cfe/trunk/test/CodeGen/reset-local-block.c (original)
+++ cfe/trunk/test/CodeGen/reset-local-block.c (removed)
@@ -1,16 +0,0 @@
-// RUN: %clang_cc1 -triple x86_64-apple-darwin10 -emit-llvm -fblocks -fcatch-undefined-behavior -o - %s | FileCheck %s
-// rdar://9227352
-
-typedef int (^BLOCK)();
-
-BLOCK FUNC() {
- int i;
- double d;
- BLOCK block = ^{ return i + (int)d; };
- if (!block)
- block = ^{ return i; };
- return block;
-}
-
-//CHECK: call void @llvm.memset{{.*}}, i8 -51, i64 36, i32 8, i1 false)
-//CHECK: call void @llvm.memset{{.*}}, i8 -51, i64 44, i32 8, i1 false)
More information about the cfe-commits
mailing list