23 lines · cpp
1// RUN: %clang_cc1 -emit-llvm %s -triple x86_64-windows-msvc -gcodeview -debug-info-kind=limited -o - | FileCheck %s2 3struct a {4 ~a();5};6template <typename b> struct c : a {7 c(void (b::*)());8};9struct B {10 virtual void e();11};12c<B> *d() {13 static c<B> f(&B::e);14 return &f;15}16 17// CHECK: define internal void @"??__Ff@?1??d@@YAPEAU?$c@UB@@@@XZ@YAXXZ"()18// CHECK-SAME: !dbg ![[SUBPROGRAM:[0-9]+]] {19// CHECK: call void @"??1?$c@UB@@@@QEAA@XZ"(ptr @"?f@?1??d@@YAPEAU?$c@UB@@@@XZ@4U2@A"), !dbg ![[LOCATION:[0-9]+]]20// CHECK: ![[SUBPROGRAM]] = distinct !DISubprogram(name: "`dynamic atexit destructor for 'f'"21// CHECK-SAME: flags: DIFlagArtificial22// CHECK: ![[LOCATION]] = !DILocation(line: 0, scope: ![[SUBPROGRAM]])23