DebugInfo: Correct location of initialization of auto __complex

llvm-svn: 223842
This commit is contained in:
David Blaikie 2014-12-09 22:15:02 +00:00
parent 9d2d7c1b00
commit 00de22f963
2 changed files with 9 additions and 1 deletions

View File

@ -1211,7 +1211,7 @@ void CodeGenFunction::EmitExprAsInit(const Expr *init, const ValueDecl *D,
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:

View File

@ -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,