forked from OSchip/llvm-project
fix rdar://7556129 a crash in blocks debug info codegen.
llvm-svn: 94402
This commit is contained in:
parent
bf78478d35
commit
83b0dd16c3
|
@ -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);
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
// RUN: %clang_cc1 -triple i386-apple-darwin10 -fblocks -g -S %s -o -
|
||||
|
||||
// rdar://7556129
|
||||
@implementation test
|
||||
- (void)wait {
|
||||
^{};
|
||||
}
|
||||
@end
|
||||
|
Loading…
Reference in New Issue