[cfe-commits] r94402 - in /cfe/trunk: lib/CodeGen/CGDebugInfo.cpp test/CodeGenObjC/debug-info-crash.m

Chris Lattner sabre at nondot.org
Sun Jan 24 19:34:56 PST 2010


Author: lattner
Date: Sun Jan 24 21:34:56 2010
New Revision: 94402

URL: http://llvm.org/viewvc/llvm-project?rev=94402&view=rev
Log:
fix rdar://7556129 a crash in blocks debug info codegen.

Added:
    cfe/trunk/test/CodeGenObjC/debug-info-crash.m
Modified:
    cfe/trunk/lib/CodeGen/CGDebugInfo.cpp

Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=94402&r1=94401&r2=94402&view=diff

==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Sun Jan 24 21:34:56 2010
@@ -1517,12 +1517,13 @@
 
   // 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);

Added: cfe/trunk/test/CodeGenObjC/debug-info-crash.m
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenObjC/debug-info-crash.m?rev=94402&view=auto

==============================================================================
--- cfe/trunk/test/CodeGenObjC/debug-info-crash.m (added)
+++ cfe/trunk/test/CodeGenObjC/debug-info-crash.m Sun Jan 24 21:34:56 2010
@@ -0,0 +1,9 @@
+// RUN: %clang_cc1 -triple i386-apple-darwin10 -fblocks -g -S %s -o -
+
+// rdar://7556129
+ at implementation test
+- (void)wait {
+  ^{};
+}
+ at end
+





More information about the cfe-commits mailing list