; RUN: llc -mtriple=x86_64-apple-macosx %s -o %t -filetype=obj
; RUN: llvm-dwarfdump -debug-dump=info %t | FileCheck %s
-
+;
+; struct A {
+; A(int i);
+; ~A();
+; };
+;
+; A::~A() {}
+;
+; void foo() {
+; A a(1);
+; }
+;
; rdar://problem/16362674
-
+;
; Test that we do not emit a linkage name for the declaration of a destructor.
; Test that we do emit a linkage name for a specific instance of it.
; CHECK: DW_TAG_subprogram
-; CHECK: [[A:.*]]: DW_TAG_subprogram
+; CHECK: [[A_DTOR:.*]]: DW_TAG_subprogram
; CHECK: DW_AT_name {{.*}} "~A"
; CHECK-NOT: DW_AT_MIPS_linkage_name
; CHECK: DW_TAG_subprogram
-; CHECK-NEXT: DW_AT_specification {{.*}}[[A]]
-; CHECK-NEXT: DW_AT_MIPS_linkage_name {{.*}} "_ZN1AD2Ev"
+; CHECK-NOT: DW_TAG
+; CHECK: DW_AT_MIPS_linkage_name {{.*}} "_ZN1AD2Ev"
+; CHECK-NOT: DW_TAG
+; CHECK: DW_AT_specification {{.*}}[[A_DTOR]]
target datalayout = "e-m:o-i64:64-f80:128-n8:16:32:64-S128"