aboutsummaryrefslogtreecommitdiff
path: root/lib/CodeGen/CGBlocks.cpp
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-03-12 03:07:24 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-03-12 03:07:24 +0000
commitd67b09abf241e527ecb2fd02b772f9486b30fd2f (patch)
tree42b694861ec135df22f2df356bce739c32e86f3e /lib/CodeGen/CGBlocks.cpp
parente8cba00b40ce8a31e8d2ee6f3ca8243cd1e37719 (diff)
Fix uninitialized use in GetAddrOfGlobalBlock, reenable assert.
- Mike, please verify. git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@66762 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'lib/CodeGen/CGBlocks.cpp')
-rw-r--r--lib/CodeGen/CGBlocks.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/CodeGen/CGBlocks.cpp b/lib/CodeGen/CGBlocks.cpp
index f10f0159e2..53e52ad478 100644
--- a/lib/CodeGen/CGBlocks.cpp
+++ b/lib/CodeGen/CGBlocks.cpp
@@ -557,7 +557,7 @@ BlockModule::GetAddrOfGlobalBlock(const BlockExpr *BE, const char * n) {
CodeGenFunction::BlockInfo Info(0, n);
uint64_t subBlockSize, subBlockAlign;
llvm::SmallVector<const Expr *, 8> subBlockDeclRefDecls;
- bool subBlockHasCopyDispose;
+ bool subBlockHasCopyDispose = false;
llvm::Function *Fn
= CodeGenFunction(CGM).GenerateBlockFunction(BE, Info, subBlockSize,
subBlockAlign,
@@ -567,7 +567,7 @@ BlockModule::GetAddrOfGlobalBlock(const BlockExpr *BE, const char * n) {
&& "no imports allowed for global block");
// FIXME: This causes a failure on clang-i686-linux, not sure why,
// disable for now.
- // assert(!subBlockHasCopyDispose && "no imports allowed for global block");
+ assert(!subBlockHasCopyDispose && "no imports allowed for global block");
// isa
LiteralFields[0] = getNSConcreteGlobalBlock();