[cfe-commits] r160049 - in /cfe/trunk: lib/CodeGen/CGDebugInfo.cpp lib/CodeGen/CodeGenFunction.h test/CodeGen/debug-info-block-end.c
Eric Christopher
echristo at apple.com
Wed Jul 11 08:32:13 PDT 2012
Author: echristo
Date: Wed Jul 11 10:32:13 2012
New Revision: 160049
URL: http://llvm.org/viewvc/llvm-project?rev=160049&view=rev
Log:
Temporarily revert this to see if it brings the gdb bot back.
Removed:
cfe/trunk/test/CodeGen/debug-info-block-end.c
Modified:
cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
cfe/trunk/lib/CodeGen/CodeGenFunction.h
Modified: cfe/trunk/lib/CodeGen/CGDebugInfo.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDebugInfo.cpp?rev=160049&r1=160048&r2=160049&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDebugInfo.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDebugInfo.cpp Wed Jul 11 10:32:13 2012
@@ -2135,6 +2135,10 @@
/// region - end of a DW_TAG_lexical_block.
void CGDebugInfo::EmitLexicalBlockEnd(CGBuilderTy &Builder, SourceLocation Loc) {
assert(!LexicalBlockStack.empty() && "Region stack mismatch, stack empty!");
+
+ // Provide an entry in the line table for the end of the block.
+ EmitLocation(Builder, Loc);
+
LexicalBlockStack.pop_back();
}
Modified: cfe/trunk/lib/CodeGen/CodeGenFunction.h
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CodeGenFunction.h?rev=160049&r1=160048&r2=160049&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CodeGenFunction.h (original)
+++ cfe/trunk/lib/CodeGen/CodeGenFunction.h Wed Jul 11 10:32:13 2012
@@ -854,11 +854,8 @@
/// cleanups.
~LexicalScope() {
if (PopDebugStack) {
- if (CGDebugInfo *DI = CGF.getDebugInfo()) {
- if (RunCleanupsScope::requiresCleanups())
- DI->EmitLocation(CGF.Builder, Range.getEnd());
- DI->EmitLexicalBlockEnd(CGF.Builder, Range.getEnd());
- }
+ CGDebugInfo *DI = CGF.getDebugInfo();
+ if (DI) DI->EmitLexicalBlockEnd(CGF.Builder, Range.getEnd());
}
}
@@ -867,8 +864,6 @@
void ForceCleanup() {
RunCleanupsScope::ForceCleanup();
if (CGDebugInfo *DI = CGF.getDebugInfo()) {
- if (RunCleanupsScope::requiresCleanups())
- DI->EmitLocation(CGF.Builder, Range.getEnd());
DI->EmitLexicalBlockEnd(CGF.Builder, Range.getEnd());
PopDebugStack = false;
}
Removed: cfe/trunk/test/CodeGen/debug-info-block-end.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/debug-info-block-end.c?rev=160048&view=auto
==============================================================================
--- cfe/trunk/test/CodeGen/debug-info-block-end.c (original)
+++ cfe/trunk/test/CodeGen/debug-info-block-end.c (removed)
@@ -1,17 +0,0 @@
-// RUN: %clang_cc1 -g -S -emit-llvm %s -o - | FileCheck %s
-
-int bar();
-
-int foo(int i) {
- int j = 0;
- if (i) {
- j = bar();
- }
- else {
- j = bar() + 2;
- }
- return j;
-}
-
-// Make sure we don't have a line table entry for a block with no cleanups.
-// CHECK-NOT: i32 9, i32 3, metadata
More information about the cfe-commits
mailing list