fix rdar://7556129 a crash in blocks debug info codegen.

llvm-svn: 94402
This commit is contained in:
Chris Lattner 2010-01-25 03:34:56 +00:00
parent bf78478d35
commit 83b0dd16c3
2 changed files with 12 additions and 2 deletions

View File

@ -1517,12 +1517,13 @@ void CGDebugInfo::EmitDeclare(const BlockDeclRefExpr *BDRE, unsigned Tag,
// Create the descriptor for the variable.
llvm::DIVariable D =
DebugFactory.CreateComplexVariable(Tag, llvm::DIDescriptor(RegionStack.back()),
DebugFactory.CreateComplexVariable(Tag,
llvm::DIDescriptor(RegionStack.back()),
Decl->getName(), Unit, Line, Ty,
addr);
// Insert an llvm.dbg.declare into the current block.
llvm::Instruction *Call =
DebugFactory.InsertDeclare(Storage, D, Builder.GetInsertPoint());
DebugFactory.InsertDeclare(Storage, D, Builder.GetInsertBlock());
llvm::DIScope DS(RegionStack.back());
llvm::DILocation DO(NULL);

View File

@ -0,0 +1,9 @@
// RUN: %clang_cc1 -triple i386-apple-darwin10 -fblocks -g -S %s -o -
// rdar://7556129
@implementation test
- (void)wait {
^{};
}
@end