r223842 - DebugInfo: Correct location of initialization of auto __complex

David Blaikie dblaikie at gmail.com
Tue Dec 9 14:15:02 PST 2014


Author: dblaikie
Date: Tue Dec  9 16:15:02 2014
New Revision: 223842

URL: http://llvm.org/viewvc/llvm-project?rev=223842&view=rev
Log:
DebugInfo: Correct location of initialization of auto __complex

Modified:
    cfe/trunk/lib/CodeGen/CGDecl.cpp
    cfe/trunk/test/CodeGenCXX/debug-info-line.cpp

Modified: cfe/trunk/lib/CodeGen/CGDecl.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/CodeGen/CGDecl.cpp?rev=223842&r1=223841&r2=223842&view=diff
==============================================================================
--- cfe/trunk/lib/CodeGen/CGDecl.cpp (original)
+++ cfe/trunk/lib/CodeGen/CGDecl.cpp Tue Dec  9 16:15:02 2014
@@ -1211,7 +1211,7 @@ void CodeGenFunction::EmitExprAsInit(con
     ComplexPairTy complex = EmitComplexExpr(init);
     if (capturedByInit)
       drillIntoBlockVariable(*this, lvalue, cast<VarDecl>(D));
-    EmitStoreOfComplex(complex, lvalue, /*init*/ true);
+    EmitStoreOfComplex(complex, lvalue, /*init*/ true, DbgLoc);
     return;
   }
   case TEK_Aggregate:

Modified: cfe/trunk/test/CodeGenCXX/debug-info-line.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGenCXX/debug-info-line.cpp?rev=223842&r1=223841&r2=223842&view=diff
==============================================================================
--- cfe/trunk/test/CodeGenCXX/debug-info-line.cpp (original)
+++ cfe/trunk/test/CodeGenCXX/debug-info-line.cpp Tue Dec  9 16:15:02 2014
@@ -57,6 +57,13 @@ void f4() {
       = src();
 }
 
+// CHECK-LABEL: define
+void f5() {
+#line 600
+  auto x // CHECK: store float {{.*}} !dbg [[DBG_F5:!.*]]
+      = complex_src();
+}
+
 // CHECK: [[DBG_F1]] = metadata !{i32 100,
 // CHECK: [[DBG_FOO_VALUE]] = metadata !{i32 200,
 // CHECK: [[DBG_FOO_REF]] = metadata !{i32 202,
@@ -64,3 +71,4 @@ void f4() {
 // CHECK: [[DBG_F2]] = metadata !{i32 300,
 // CHECK: [[DBG_F3]] = metadata !{i32 400,
 // CHECK: [[DBG_F4]] = metadata !{i32 500,
+// CHECK: [[DBG_F5]] = metadata !{i32 600,





More information about the cfe-commits mailing list